Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening Variable File Names


I need to write a Macro to ask for an input number (say 123) and the
open a series of workbooks based on this input - e.g. AA123.xls
AB123.xls. Can anybody please suggest some code to enable this. Thank

--
simoncohe
-----------------------------------------------------------------------
simoncohen's Profile: http://www.excelforum.com/member.php...nfo&userid=785
View this thread: http://www.excelforum.com/showthread.php?threadid=31369

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Opening Variable File Names

ans= Inputbox("Please supply file id")
If ans < "" Then
Workbooks.Open Filename:= "AA" & ans & ".xls"
End if

--

HTH

RP
(remove nothere from the email address if mailing direct)


"simoncohen" wrote in message
...

I need to write a Macro to ask for an input number (say 123) and then
open a series of workbooks based on this input - e.g. AA123.xls,
AB123.xls. Can anybody please suggest some code to enable this. Thanks


--
simoncohen
------------------------------------------------------------------------
simoncohen's Profile:

http://www.excelforum.com/member.php...fo&userid=7854
View this thread: http://www.excelforum.com/showthread...hreadid=313695



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable file names Paul Peterson - Velox Consulting, LLC Excel Discussion (Misc queries) 8 February 4th 10 01:54 PM
creating a variable for file names BEAST Excel Discussion (Misc queries) 2 May 12th 07 09:39 PM
variable file names Brettjg Excel Discussion (Misc queries) 2 March 2nd 07 10:56 AM
Help in opening powerpoint file variable from excel Mithi_M Excel Programming 1 August 1st 04 04:33 PM
VBA for opening file/populating combo box with sheet names Sinobato[_4_] Excel Programming 3 July 26th 04 06:35 PM


All times are GMT +1. The time now is 01:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"