Re: Constant as network drive
- From: Dave Peterson <petersod@xxxxxxxxxxxxxxxx>
- Date: Fri, 16 Oct 2009 11:40:30 -0500
Windows(something).activate
doesn't depend on the path--mapped or UNC.
You only use the filename (Book1.xls, not c:\my documents\excel\book1.xls).
Ps.
I try my best to not use the windows collection. I'll go through the workbooks
collection. And if my code opens the workbook:
Dim wkbk as workbook
set wkbk = workbooks.open(filename:=somefilenamehere)
....
I can use:
wkbk.activate
But be aware that most things can be done without activating or selecting.
Merlynsdad wrote:
I have an Excel file which needs to access another Excel file on a network. I
want to write the filename as a constant. This works fine when the constant
refers to a file on my local drive, but if the constant refers to a network
drive, when the code gets to "Windows (constant).Activate" it fails. How do I
get this to refer to a file on a network drive?
--
Dave Peterson
.
- References:
- Constant as network drive
- From: Merlynsdad
- Constant as network drive
- Prev by Date: RE: Regex exception
- Next by Date: Re: XMLHTTP
- Previous by thread: Re: Constant as network drive
- Next by thread: RE: Constant as network drive
- Index(es):
Relevant Pages
|