Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default running macros from LIST choices

I have a sheet that runs macros which open text files, manipulate the data,
and give me a clean, readable output. Works great, as long as I always have
the same drive as the source.

But I want to give the user an option to choose the drive from which to pull
the data and where to put the report.

Right now, I have Modules 1 thru 4, each performing a different function,
all from the F: drive, based on the push of buttons 1 thru 4. What I would
like to be able to do is select which report to run from a list, as well as
which drive to pull from using another list, and somehow pass this info to a
macro.

The drive options I will need are A & C thru G. I COULD write a macro for
each and every SUB, hard coding the drive info, but that will result in 28
SUBs, kinda messy & bulky. If it is possible to do what I am asking, I could
pass two variables to 4 different SUBs, and open the data from whichever
drive the user selects.

Thanks in advance for your help!
Dave
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default running macros from LIST choices

You could drives in a dropdown, but the file would have to be in the same
spot on each.
Will a dialog work for you?

Application.Dialogs(xlDialogFindFile).Show
They can select the drive and file
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"F6Hawk" wrote:

I have a sheet that runs macros which open text files, manipulate the data,
and give me a clean, readable output. Works great, as long as I always have
the same drive as the source.

But I want to give the user an option to choose the drive from which to pull
the data and where to put the report.

Right now, I have Modules 1 thru 4, each performing a different function,
all from the F: drive, based on the push of buttons 1 thru 4. What I would
like to be able to do is select which report to run from a list, as well as
which drive to pull from using another list, and somehow pass this info to a
macro.

The drive options I will need are A & C thru G. I COULD write a macro for
each and every SUB, hard coding the drive info, but that will result in 28
SUBs, kinda messy & bulky. If it is possible to do what I am asking, I could
pass two variables to 4 different SUBs, and open the data from whichever
drive the user selects.

Thanks in advance for your help!
Dave

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default running macros from LIST choices

Yes, the files necessary will always have to reside in the same folder, that
is a given. Typically, the files will be on a USB stick (as the RAWDATA text
files come from one computer system, then will be transported to a WinXP
system for Excel manipulation), and that is why the need for variance in
drives.

I am not familiar with a dialog, I will look into this. Thanks for the reply!

"John Bundy" wrote:

You could drives in a dropdown, but the file would have to be in the same
spot on each.
Will a dialog work for you?

Application.Dialogs(xlDialogFindFile).Show
They can select the drive and file
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"F6Hawk" wrote:

I have a sheet that runs macros which open text files, manipulate the data,
and give me a clean, readable output. Works great, as long as I always have
the same drive as the source.

But I want to give the user an option to choose the drive from which to pull
the data and where to put the report.

Right now, I have Modules 1 thru 4, each performing a different function,
all from the F: drive, based on the push of buttons 1 thru 4. What I would
like to be able to do is select which report to run from a list, as well as
which drive to pull from using another list, and somehow pass this info to a
macro.

The drive options I will need are A & C thru G. I COULD write a macro for
each and every SUB, hard coding the drive info, but that will result in 28
SUBs, kinda messy & bulky. If it is possible to do what I am asking, I could
pass two variables to 4 different SUBs, and open the data from whichever
drive the user selects.

Thanks in advance for your help!
Dave

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
Using list choices to use as headers Obrien21 Excel Worksheet Functions 3 February 24th 09 01:34 AM
Running Macros by selecting from a dropdown list FionaR Excel Discussion (Misc queries) 3 January 3rd 07 01:24 PM
How do I allow multiple choices in a list-box? rmcgreg Excel Worksheet Functions 0 February 3rd 06 06:03 PM
Macros--user choices dnatoday Excel Programming 2 November 2nd 05 04:16 PM
Drop down list with multiple choices Cindy Excel Worksheet Functions 6 March 30th 05 01:35 AM


All times are GMT +1. The time now is 10:12 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"