Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Selecting filename in Visual Basic

I am trying to write a macro using VBA that prompts the user to make a
filename selection in order to make the necessary changes to each workbook.
The same macro will be run on each workbook.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Selecting filename in Visual Basic

Your post is a little thin on details. Are the files already open? Are they
XL files? Did you just need to get a list of file names or do you need to
open the files?

--
HTH...

Jim Thomlinson


"Bruce Htown" wrote:

I am trying to write a macro using VBA that prompts the user to make a
filename selection in order to make the necessary changes to each workbook.
The same macro will be run on each workbook.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Selecting filename in Visual Basic

Here is the longer version. I have created a Macro in order to make
corrections to an Excell spreadsheet from a Master template. The macro is
setup to make the changes to the selected spreadsheet, but I need to have the
ability to have the user select the file since we have about 700 to 800 files
that need to be corrected. The problem that I have is creating the script to
prompt the user to select the file. I have tried the "FileName" select
script but I get an error message and the macro stops running.

"Jim Thomlinson" wrote:

Your post is a little thin on details. Are the files already open? Are they
XL files? Did you just need to get a list of file names or do you need to
open the files?

--
HTH...

Jim Thomlinson


"Bruce Htown" wrote:

I am trying to write a macro using VBA that prompts the user to make a
filename selection in order to make the necessary changes to each workbook.
The same macro will be run on each workbook.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 897
Default Selecting filename in Visual Basic

Application.GetOpenFilename opens the native Excel "Open" dialog and
returns a user-selected filename as a string variable:

See
http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx


HTH,
JP

On Mar 18, 5:55*pm, Bruce Htown
wrote:
Here is the longer version. *I have created a Macro in order to make
corrections to an Excell spreadsheet from a Master template. *The macro is
setup to make the changes to the selected spreadsheet, but I need to have the
ability to have the user select the file since we have about 700 to 800 files
that need to be corrected. *The problem that I have is creating the script to
prompt the user to select the file. *I have tried the "FileName" select
script but I get an error message and the macro stops running.



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
Are there any NON-Visual Basic solutions for inserting a picture based a derived or called filename? The Great Attractor Excel Worksheet Functions 7 May 27th 07 04:38 AM
Selecting Cells With Visual Basic or Macro Code RajenRajput1 Excel Discussion (Misc queries) 5 May 11th 07 05:56 PM
visual basic jiwolf Excel Worksheet Functions 2 October 8th 05 09:12 PM
Visual Basic and SP2 JessJ Excel Discussion (Misc queries) 2 October 6th 05 12:17 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM


All times are GMT +1. The time now is 05:46 AM.

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

About Us

"It's about Microsoft Excel"