Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Defining a Variable

Using Option Explicit gives me the compile error: Variable not defined, on
this code. What would the correction be?

Sub OpenCalendar()
frmCalendar.Show
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Defining a Variable

Hi Phil,

The error suggests that a userform named frmCalendar was not found.

Check that the forms name is correct.


---
Regards,
Norman



"Phil H" wrote in message
...
Using Option Explicit gives me the compile error: Variable not defined, on
this code. What would the correction be?

Sub OpenCalendar()
frmCalendar.Show
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Defining a Variable

Hi Phil,

Verify also that the OpenCalendar sub is housed in a module in the same
workbook as the userform.


---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi Phil,

The error suggests that a userform named frmCalendar was not found.

Check that the forms name is correct.


---
Regards,
Norman



"Phil H" wrote in message
...
Using Option Explicit gives me the compile error: Variable not defined,
on
this code. What would the correction be?

Sub OpenCalendar()
frmCalendar.Show
End Sub





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Defining a Variable

You are correct. I renamed the form and neglected to take that in to
account. Thanks for the help

"Norman Jones" wrote:

Hi Phil,

The error suggests that a userform named frmCalendar was not found.

Check that the forms name is correct.


---
Regards,
Norman



"Phil H" wrote in message
...
Using Option Explicit gives me the compile error: Variable not defined, on
this code. What would the correction be?

Sub OpenCalendar()
frmCalendar.Show
End Sub




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
Defining a Variable Range Dave Peterson[_5_] Excel Programming 0 January 19th 05 02:30 AM
Defining a variable within a sub... aking1987[_3_] Excel Programming 1 November 11th 04 01:12 PM
Defining a variable within a sub... aking1987[_2_] Excel Programming 1 November 11th 04 12:32 PM
Defining a variable within a sub... aking1987 Excel Programming 1 November 11th 04 11:00 AM
Defining a Variable Stephen[_3_] Excel Programming 1 September 8th 03 11:33 PM


All times are GMT +1. The time now is 08:42 AM.

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"