View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Referencing Spreadsheet in VBA

See application.GetOpenfileName()

it puts up the file open dialog and allows the user to select a file. It
returns the users selection as a string and then your code can open that file
with the workbook.open method.

--
Regards,
Tom Ogilvy


"Timmy Mac1" wrote:


I want to create a macro that imports data from a spreadsheet delivered
occasionally.

How can I set up the macro in such a way that the user can input the
name of the spreadsheet from which the data is to be copied over?


--
Timmy Mac1
------------------------------------------------------------------------
Timmy Mac1's Profile: http://www.excelforum.com/member.php...o&userid=15188
View this thread: http://www.excelforum.com/showthread...hreadid=535579