Web linked Excel Macro does not work. HELP

  • Thread starter Jan Nademlejnsky
  • Start date
J

Jan Nademlejnsky

Problem 1:

I have WEB link which opens Excel sheet (HT-2.xls). This sheet has macro
button which when clicked opens another sheet and does something. It goes to
error, because it does not recognize this statement, but why:
Workbooks.Open FileName:=\\OSGDAT\EXTKPY\Hydrotransport\HT-2Imported.xls

Mind you, that this works if I start Excel, open HT-2.xls and click my macro
button.
This also works if Web opens blank Outlook.oft with link to HT-2. Clicking
this link opens HT-2.xls, and clicking macro button in HT-2.xls opens
HT-2Importes.xls

Problem 2:

Is it possible to use relative Path in this statement: Workbooks.Open
FileName:="\\OSGDAT\EXTKPY\Hydrotransport\HT-2Imported.xls"
I have many spread sheets in different directories with complex macros on
network, let's say on N: drive. If IS decide to change the server name to
something else, then I would have a major problem to rewrite all path
names.I would like to have it structured similarly to Web design: If the
folder name and structure does not change, then it does not matter where you
put it. I would be able to move all from N: to K: and no fiddling with the
code.

I am hoping that someone could help me.
Jan Nademlejnsky
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top