Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 219
Default confused and confounded!

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default confused and confounded!

Bet she changed the spelling.

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

--
Jim
"salgud" wrote in message
...
|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?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 219
Default confused and confounded!

On Thu, 17 Jul 2008 14:16:41 -0400, Jim Rech wrote:

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.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default confused and confounded!

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

Keith

"salgud" wrote:

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?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 219
Default confused and confounded!

On Thu, 17 Jul 2008 12:56:23 -0600, salgud wrote:

On Thu, 17 Jul 2008 14:16:41 -0400, Jim Rech wrote:

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.


I changed it to "Thisworkbook" and now it's working. Go figure.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 219
Default confused and confounded!

On Thu, 17 Jul 2008 13:43:08 -0700, Keithlo wrote:

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

Keith

"salgud" wrote:

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?


thanks for your reply. Got it working with "Thisworkbook".
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default confused and confounded!

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
"salgud" wrote in message
...
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?



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 219
Default confused and confounded!

On Thu, 17 Jul 2008 17:26:48 -0400, Mike Fogleman wrote:

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
"salgud" wrote in message
...
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?


Thanks for the reply. I should have mentioned that's the first thing I did.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Confounded by date differences DubboPete Excel Discussion (Misc queries) 3 March 4th 10 12:07 AM
confused. Please help. doss04 Excel Discussion (Misc queries) 9 October 4th 08 10:38 PM
I'm still confused Hoytmedic Excel Worksheet Functions 4 July 8th 07 01:28 AM
Confused Karmen New Users to Excel 4 February 24th 06 08:27 PM
confused,please help shrutikhurana Excel Discussion (Misc queries) 1 February 3rd 06 12:32 PM


All times are GMT +1. The time now is 09:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"