Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
On Error GoTo Doesn't Work
When the active cell doesn't have a Reference Name the "On Error GoTo
ExitMe" does not trigger but instead I get the runtime error 1004. Could you please tell me what I am doing wrong? Thanks- Private Sub CancelButton_Click() Me.Hide End Sub Private Sub OKButton_Click() Me.Hide End Sub Private Sub UserForm_Activate() On Error GoTo ExitMe TextBox1.Text = ActiveCell.Name.Name GoTo Done ExitMe: TextBox1.Text = "Sorry this cell does not have a refrence name" Done: End Sub |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
On Error GoTo Doesn't Work
Inside the VBE with your workbook's project selected:
Tools|Options|General tab change the error trapping from "break on all errors" to "break in class module" wrote: When the active cell doesn't have a Reference Name the "On Error GoTo ExitMe" does not trigger but instead I get the runtime error 1004. Could you please tell me what I am doing wrong? Thanks- Private Sub CancelButton_Click() Me.Hide End Sub Private Sub OKButton_Click() Me.Hide End Sub Private Sub UserForm_Activate() On Error GoTo ExitMe TextBox1.Text = ActiveCell.Name.Name GoTo Done ExitMe: TextBox1.Text = "Sorry this cell does not have a refrence name" Done: End Sub -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
On Error GoTo Doesn't Work
Thanks Dave You da MAN!!! :-)
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Question on "On Error GoTo skip" | Excel Discussion (Misc queries) | |||
On Error GoTo Label in a loop only working once. | Charts and Charting in Excel | |||
On Error GoTo skip needs help | Excel Discussion (Misc queries) | |||
DSUM gives a #VALUE! error and I can't work out why! | Excel Worksheet Functions | |||
Goto Data validation Same ERROR | Excel Discussion (Misc queries) |