ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Defining a Variable (https://www.excelbanter.com/excel-programming/362051-defining-variable.html)

Phil H[_2_]

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


Norman Jones

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




Norman Jones

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






Phil H[_2_]

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






All times are GMT +1. The time now is 02:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com