Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Store FilePath Inside Code

Hello,

I have a macro that pastes data into a file, say File A, from all files in a
specific folder. I'm trying to enhance the macro by having a MessegeBox pop
up before the macro executes that asks whether the uses wants to use a
different folder than the one used previously. If the uses clicks "Yes" on
the MessegeBox, an InputBox pops up that asks the user for the path of the
new file.

The problem is that I if the user clicks "Yes" in the MessegeBox and enters
a new folder in the InputBox, I need to be able to store the path, so that
next time, if the user clicks "No", the macro will know the path to the
previously used folder.

Any help on how to accomplish the above would be greatly appreciated.

Thank You!

Magnivy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Store FilePath Inside Code

http://www.j-walk.com/ss/excel/tips/tip29.htm

can't you write it to a cell, perhaps on a hidden sheet.

--
Regards,
Tom Ogilvy


"Magnivy" wrote:

Hello,

I have a macro that pastes data into a file, say File A, from all files in a
specific folder. I'm trying to enhance the macro by having a MessegeBox pop
up before the macro executes that asks whether the uses wants to use a
different folder than the one used previously. If the uses clicks "Yes" on
the MessegeBox, an InputBox pops up that asks the user for the path of the
new file.

The problem is that I if the user clicks "Yes" in the MessegeBox and enters
a new folder in the InputBox, I need to be able to store the path, so that
next time, if the user clicks "No", the macro will know the path to the
previously used folder.

Any help on how to accomplish the above would be greatly appreciated.

Thank You!

Magnivy

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Store FilePath Inside Code

That would work too. I just thought that there might be some easy way to
store the path inside the code that I didnt come across.

Thanks for your help!

Magnivy

"Tom Ogilvy" wrote:

http://www.j-walk.com/ss/excel/tips/tip29.htm

can't you write it to a cell, perhaps on a hidden sheet.

--
Regards,
Tom Ogilvy


"Magnivy" wrote:

Hello,

I have a macro that pastes data into a file, say File A, from all files in a
specific folder. I'm trying to enhance the macro by having a MessegeBox pop
up before the macro executes that asks whether the uses wants to use a
different folder than the one used previously. If the uses clicks "Yes" on
the MessegeBox, an InputBox pops up that asks the user for the path of the
new file.

The problem is that I if the user clicks "Yes" in the MessegeBox and enters
a new folder in the InputBox, I need to be able to store the path, so that
next time, if the user clicks "No", the macro will know the path to the
previously used folder.

Any help on how to accomplish the above would be greatly appreciated.

Thank You!

Magnivy

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Store FilePath Inside Code



You can modify code with code, but I wouldn't call it easy and if you want
to lock your code, then that isn't an option.

http://www.cpearson.com/excel/vbe.htm

--
Regards,
Tom Ogilvy


"Magnivy" wrote:

That would work too. I just thought that there might be some easy way to
store the path inside the code that I didnt come across.

Thanks for your help!

Magnivy

"Tom Ogilvy" wrote:

http://www.j-walk.com/ss/excel/tips/tip29.htm

can't you write it to a cell, perhaps on a hidden sheet.

--
Regards,
Tom Ogilvy


"Magnivy" wrote:

Hello,

I have a macro that pastes data into a file, say File A, from all files in a
specific folder. I'm trying to enhance the macro by having a MessegeBox pop
up before the macro executes that asks whether the uses wants to use a
different folder than the one used previously. If the uses clicks "Yes" on
the MessegeBox, an InputBox pops up that asks the user for the path of the
new file.

The problem is that I if the user clicks "Yes" in the MessegeBox and enters
a new folder in the InputBox, I need to be able to store the path, so that
next time, if the user clicks "No", the macro will know the path to the
previously used folder.

Any help on how to accomplish the above would be greatly appreciated.

Thank You!

Magnivy

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
store inventory sheet(ex:sports equipment store) vardan Excel Worksheet Functions 1 October 11th 06 12:51 AM
Code an image viewer inside XL quartz[_2_] Excel Programming 4 August 15th 06 02:41 PM
Store an image inside a cell? tx12345 Excel Worksheet Functions 3 January 18th 06 04:01 AM
What method do you use to save/store your developed code? Scott Wagner Excel Programming 5 December 19th 05 03:38 AM
Excel 2002? Where to store code for all spreadsheet visibility? Colin Johnson Excel Programming 0 February 26th 04 03:17 PM


All times are GMT +1. The time now is 02:53 PM.

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"