LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Object not defined

Hi all,

This works

Dim debriefBook As Workbook

Sub booktest()
Set debriefBook = ThisWorkbook
MsgBox debriefBook.Name
End Sub

but if I call a function from a different module,

Sub ShowName
Set debriefBook = ThisWorkbook
ShowMe
End Sub

and this is in a different module!
Function Showme()
MsgBox debriefBook.Name
End Function
It doesnt work, it says "object not defined"
I'm not sure whats going on.


 
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
Run-time error '50290': Application-defined or object-defined erro Macro button Excel Discussion (Misc queries) 1 March 12th 09 10:59 AM
Application-defined or object-defined error Please Help [email protected] Excel Discussion (Misc queries) 1 April 3rd 06 01:00 PM
Application-defined or object-defined error Sharon[_5_] Excel Programming 2 October 24th 03 03:49 PM
VBA - Application-defined or object-defined error tina salgia Excel Programming 0 August 24th 03 10:35 PM
VBA - Application-defined or object-defined error Chip Pearson Excel Programming 0 August 24th 03 08:43 PM


All times are GMT +1. The time now is 01:43 PM.

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

About Us

"It's about Microsoft Excel"