confused and confounded!

S

salgud

I created a macro, with some help here, and sent it to another office
across the state. When she tries to run it on that computer, she gets a
runtime error that it doesn't recognize the object on this line:

Set wbTribal = Workbooks("Tribal template.xls")

wbTribal is dimmed as a workbook.

The workbook is "Tribal template.xls". It's like it can't find itself. How
can this be? I emailed it to another computer in my office, and it works
fine. She is running a different version of Windoze (I'm on 2000 here,
she's on XP) and a different version of XL, but the computer I send it to
in my office is XP and the same version of XL that she has. Can someone
tell me how a file can't recognize itself because it's on a different
computer?
 
J

Jim Rech

Bet she changed the spelling.

If the code is referring to itself use ThisWorkbook instead of the name.

--
Jim
|I created a macro, with some help here, and sent it to another office
| across the state. When she tries to run it on that computer, she gets a
| runtime error that it doesn't recognize the object on this line:
|
| Set wbTribal = Workbooks("Tribal template.xls")
|
| wbTribal is dimmed as a workbook.
|
| The workbook is "Tribal template.xls". It's like it can't find itself. How
| can this be? I emailed it to another computer in my office, and it works
| fine. She is running a different version of Windoze (I'm on 2000 here,
| she's on XP) and a different version of XL, but the computer I send it to
| in my office is XP and the same version of XL that she has. Can someone
| tell me how a file can't recognize itself because it's on a different
| computer?
 
S

salgud

Bet she changed the spelling.

If the code is referring to itself use ThisWorkbook instead of the name.

Thanks for your reply.
She says she didn't change anything, and I can't figure out why she would.
This spreadsheet is going to save her a lot of headaches and she says she's
anxious to get it and use it. Who knows?
I had thought about trying "Thisworkbook", so I'll try that next.
 
K

Keithlo

There is also a Trim function in Excel that will remove leading and trailing
spaces.

Keith
 
M

Mike Fogleman

Have her save it to her hard drive before she opens it and tries to run the
macro. When you open a file directly from email it will save it to a temp
folder and then open it. That will sometimes append a (1) to the file name
that the macro doesn't match to. Using ThisWorkbook should cure that
scenario also.

Mike F
 
S

salgud

Have her save it to her hard drive before she opens it and tries to run the
macro. When you open a file directly from email it will save it to a temp
folder and then open it. That will sometimes append a (1) to the file name
that the macro doesn't match to. Using ThisWorkbook should cure that
scenario also.

Mike F

Thanks for the reply. I should have mentioned that's the first thing I did.
 

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