Hi Guys

I'm new, both here, and really to programming in general.

It's become a remit in my job to write reports for a Management Accounting point of view, and because I was stupid enough to open my mouth and say that I had good computer knowledge when we were setting this up I have been given the honour. I have somehow managed to fumble through with the help of various books and Microsoft online help, and am thankfully getting to grips with SQL, however I've now come across a problem which has stumped me for sometime and wondered if anyone can help me?

What I basically have is a Query that interrogates our severs and pulls out all our invoices within a month, and returns the data into an excel spreadsheet. (The query actually just looks at the invoicing table), and I have written a Stored proceedure and included two parameters month and year, which I can then run in MS Query as the following command line.

'EXECUTE [dbo].[proceedure]
@pMonth = ??,
@pYear = ????'

Easy, all I need to do month upon month is go into the query and change the parameters. from month 01 to month 02 and so on.

Now my boss would like to be able to pass this month information from Excel (a logical if not problematic extension)

What I would like to do is link a cell to each of the two parameters. For example

EXECUTE [dbo].[proceedure]
@pMonth = Cell A1
@pYear = Cell A2

but I can't find out what the relevant code would be to reference the relevant cells anywhere.

Any help would really be appreciated.

Thanks in advance.