ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro with Drive-change? (https://www.excelbanter.com/excel-programming/342382-macro-drive-change.html)

Daniel R. Young

Macro with Drive-change?
 
I have a macro where it will open a word document from the F: drive and paste
a selection to it.

I was wondering if there is a general way to make a drive (the word doc
should be on the CD/dvd drive) so it won't error if the drive is named
differently then my macro code?

Is there a better way I should do this, such as make someone save a folder
to there desktop or something? Any recommendations?

Thank you,

Daniel Young

Jim Rech

Macro with Drive-change?
 
Typically I ask the user where a file is when its local is not certain. For
example with Application.GetOpenFilename.

--
Jim
"Daniel R. Young" wrote in message
...
|I have a macro where it will open a word document from the F: drive and
paste
| a selection to it.
|
| I was wondering if there is a general way to make a drive (the word doc
| should be on the CD/dvd drive) so it won't error if the drive is named
| differently then my macro code?
|
| Is there a better way I should do this, such as make someone save a folder
| to there desktop or something? Any recommendations?
|
| Thank you,
|
| Daniel Young



Daniel R. Young

Macro with Drive-change?
 
Jim,
I am sorry, I am new to this, but what do you mean? If this product is on a
CD and can be used by mulitple computers, the drives may be different. Does
the Application.GetOpenFilename search for the file or something?

Thank you,
Dan

"Jim Rech" wrote:

Typically I ask the user where a file is when its local is not certain. For
example with Application.GetOpenFilename.

--
Jim
"Daniel R. Young" wrote in message
...
|I have a macro where it will open a word document from the F: drive and
paste
| a selection to it.
|
| I was wondering if there is a general way to make a drive (the word doc
| should be on the CD/dvd drive) so it won't error if the drive is named
| differently then my macro code?
|
| Is there a better way I should do this, such as make someone save a folder
| to there desktop or something? Any recommendations?
|
| Thank you,
|
| Daniel Young




Jim Rech

Macro with Drive-change?
 
It does exactly what Excel's File, Open dialog does - it gives the user an
opportunity to select the file through a convenient dialog. Play with this
to see if it helps. Check it out in VB Help, there are examples there you
can run.

--
Jim
"Daniel R. Young" wrote in message
...
| Jim,
| I am sorry, I am new to this, but what do you mean? If this product is on
a
| CD and can be used by mulitple computers, the drives may be different.
Does
| the Application.GetOpenFilename search for the file or something?
|
| Thank you,
| Dan
|
| "Jim Rech" wrote:
|
| Typically I ask the user where a file is when its local is not certain.
For
| example with Application.GetOpenFilename.
|
| --
| Jim
| "Daniel R. Young" wrote in
message
| ...
| |I have a macro where it will open a word document from the F: drive and
| paste
| | a selection to it.
| |
| | I was wondering if there is a general way to make a drive (the word
doc
| | should be on the CD/dvd drive) so it won't error if the drive is named
| | differently then my macro code?
| |
| | Is there a better way I should do this, such as make someone save a
folder
| | to there desktop or something? Any recommendations?
| |
| | Thank you,
| |
| | Daniel Young
|
|
|




All times are GMT +1. The time now is 02:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com