Re: Pass variable to Excel Macro from Access
am 30.03.2008 15:39:09 von peterV1On 28 Mar, 17:01, Niranjan
> On Mar 28, 3:37 am, "KC-Mass"
>
>
>
> > Couln't you just store the value in a cell of the worksheet and have the
> > Macro reference the cell?
>
> > Kevin
>
> > "Niranjan"
>
> >news:f4e83832-7e50-4c1d-881f-41b6c5714e40@p25g2000hsf.googl egroups.com...
>
> > >I have an Excel macro that I execute from Access. I want to change it
> > > so that I can pass a variable (filename) from Access to the Excel
> > > Macro. This will allow me to import a different file everytime I
> > > execute the macro.
>
> > > Does anyone know how to do this?- Hide quoted text -
>
> > - Show quoted text -
>
> Kevin:
> Thanks for the response. I think that will work.
> However I am not sure how to write a string from Access into a Excel -
> Sheet1 - Cell A1.
> If anyone knows. please let me know. Thanks.
Tools -> Data -> Get External Data allows you to link an Excel range
to an Access table/query, then you
just have to write the variable to the table/query in Access