Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VB question...

Macros in Excel2000 reference directories on the network
through mapped drives, hence the map is listed in the
Macro: e.g. F:\client\new\directory

We are now mg servers and it is proving a problem to go
through the VB script and amend the mapped letter to point
to a new location (I know I can do a find/replace!!)

Is there any easier method of deploying paths in Macros,
so if we go through another server change, we do not face
any agro?

thanks,

skc
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default VB question...

if the file structure on the server is the same then if
you map the server to the same drive, it won't affect
your code at all.

Patrick Molloy
Microsoft Excel MVP

-----Original Message-----
Macros in Excel2000 reference directories on the network
through mapped drives, hence the map is listed in the
Macro: e.g. F:\client\new\directory

We are now mg servers and it is proving a problem to go
through the VB script and amend the mapped letter to

point
to a new location (I know I can do a find/replace!!)

Is there any easier method of deploying paths in Macros,
so if we go through another server change, we do not

face
any agro?

thanks,

skc
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default VB question...

On the latter point of an easier method, it is a good practice to setup
constant for frequently used, or variable, values. In this way, you could
have a constant for these paths, all in one easily accessible, easily
changed place.

I put my constants in an independent module, with shared code.

--
HTH

-------

Bob Phillips
... looking out across Poole Harbour to the Purbecks


"skc" wrote in message
...
Macros in Excel2000 reference directories on the network
through mapped drives, hence the map is listed in the
Macro: e.g. F:\client\new\directory

We are now mg servers and it is proving a problem to go
through the VB script and amend the mapped letter to point
to a new location (I know I can do a find/replace!!)

Is there any easier method of deploying paths in Macros,
so if we go through another server change, we do not face
any agro?

thanks,

skc



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VB question...

Just to echo what Patrick said - it seems to me that with a little
discipline, using the drive name would be more permanent than trying some
alternative like the Server name, if changing servers is the point of
concern. If you will be changing file locations, so that either or all of
Server Name and Drive letter and directory could change, then you might have
common file (or registry entries) that scripts reference to set a variable
value and use the variable in your code.

Regards,
Tom Ogilvy


"Patrick Molloy" wrote in message
...
if the file structure on the server is the same then if
you map the server to the same drive, it won't affect
your code at all.

Patrick Molloy
Microsoft Excel MVP

-----Original Message-----
Macros in Excel2000 reference directories on the network
through mapped drives, hence the map is listed in the
Macro: e.g. F:\client\new\directory
er
We are now mg servers and it is proving a problem to go
through the VB script and amend the mapped letter to

point
to a new location (I know I can do a find/replace!!)

Is there any easier method of deploying paths in Macros,
so if we go through another server change, we do not

face
any agro?

thanks,

skc
.



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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
If Question carl Excel Worksheet Functions 3 May 7th 08 07:24 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM


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