Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default RunTime Error 424 in a USERFORM's code

To All,

Getting a runtime error # 424 on Closing of a USERFORM.
I'm trying to set a cell on the worksheet - which contains the
CmdButton that launched the UserForm. But my attempts to reference the
cell fail?

Could someone kindly instruct me how to set this up properly?

Thanks ...

JimP

'''''''''''''''''''''''''''''''
' TRIED TO DO THIS FIRST ....
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
Integer)
If CloseMode < vbFormControlMenu Then
Cancel = False
' SYSTEM requested to close FORM, so set my flag!
[frmNAVIGATE_Run_flag].Value = 1 'PROBLEM ON THIS LINE
Else
Cancel = True: QuitButton_Click ' CANCEL QueryClose ... do what I
need
End If
End Sub

'''''''''''''''''''''''''''''''
' TRIED THIS SECOND ...
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
Integer)
Dim ws As Worksheet: Set ws = Sheets(ActiveSheet.name)
If CloseMode < vbFormControlMenu Then
Cancel = False
' SYSTEM requested to close FORM, so set my flag!
ws.[frmNAVIGATE_Run_flag].Value = 1 'PROBLEM ON THIS LINE
Else
Cancel = True: QuitButton_Click ' CANCEL QueryClose ... do what I
need
End If
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
runtime error code 1004 Karen Excel Worksheet Functions 1 May 13th 10 12:21 AM
Runtime error '1004' General ODBC error star_lucas New Users to Excel 0 August 29th 05 04:09 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Repost with code - Runtime error '1004' muziq2[_20_] Excel Programming 5 July 17th 04 12:46 AM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 11:04 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"