View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
davegb davegb is offline
external usenet poster
 
Posts: 573
Default XL doesn't like my path?


Dave Peterson wrote:
If wbOrig is a string, then you don't need Set:

wbOrig _
= "H:\AllDocs\CFSR PIP DD\SFY 06 Q1\Records Base\Abuse in Care original.xls"

And you need double quotes around the string.

If wbOrig is a workbook object:

Dim OrigName as string
dim OrigWkbk as workbook 'I like more info in the variables

OrigName _
= "H:\AllDocs\CFSR PIP DD\SFY 06 Q1\Records Base\Abuse in Care original.xls"

set OrigWkbk = workbooks.open(filename:=origname)


davegb wrote:

I'm trying to tell XL which workbook to use:

Set wbOrig = H:\AllDocs\CFSR PIP DD\SFY 06 Q1\Records Base\Abuse in
Care original.xls

but it doesn't like my backslash. I searched in the NG, but couldn't
find a similar example. So how do I tell it the path and workbook name?

Thanks!


--

Dave Peterson


Thanks everyone! I should have mentioned that wbOrig is a workbook
object. Got it worked out!