Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
getting same save-on-close macro to work from different networklocations
Thanks for the prompt reply, BUT..
I've not been able to use the environ() function to identify the machine on which the program is running, possibly because it is was not yet an easily accessed feature at the time my version of Excel (Excel97) and Visual Basic were published. My reason is that the following macro returns a blank, Dim CompName Sub what_machine() CompName = Environ("COMPUTERNAME") ActiveCell.Value = CompName End Sub even though (1) the machine appears to have name "Pentium_IV" when you examine the list of things connected to my local network, (2) Visual basic does not declare it an invalid function and (3) when I run MSinfo32 from RUN, it shows "On "PENTIUM_IV" as "Michael" I also tried without success using the function Environ$ although the I don't know when one would use Environ and when one would use Environ$. I'm not currently anxious to upgrade to a newer version of office because, except for this problem, EXCEL97 meets all my needs and runs with lightning speed. Moreoverm I have noted that the function is referred to in the context of Microsoft Visual Basic for MSDOS Version 1.0 at: http://support.microsoft.com/default...kb;en-us;69846 This suggests that with additional code, one might be able to get the Environ info from the operating system. Is there another way to: (1) identify the machine on which the EXCEL program is running or (2) specify the path, so I can tailor SaveOnClose() to always save to the same machine???? Tom Ogilvy wrote: Option 1 shouldn't be that hard if environ("COMPUTERNAME") = "AMD" then else End if |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to open, Update links, save and close workbooks | Excel Discussion (Misc queries) | |||
Macro to save and close, then copy file | Excel Discussion (Misc queries) | |||
How to code the Macro to save and close a file? | Excel Discussion (Misc queries) | |||
Macro to save & close all opened files | Excel Discussion (Misc queries) | |||
Automate open file, update links, run macro, close and save file | Excel Programming |