LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Macro to run if cell empty

Greg,

You could use workbook_open then, something like


Private Sub Workbook_Open()
If Worksheets("Sheet1").Range("A1") = "" Then
Userform1.Show
Worksheets("Sheet1").Range("A1") = "X"
Else
'do something else
End If
End Sub


'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Greg" wrote in message
...
I wanted to run a userform once when this workbook is loaded for the first
time. I needed the user to place some information information in this

form.
Once this userform is used I did not want it to load up again.

Not sure how to do this exactly though maybe it could look up the cell

where
this information would be placed. If empty run a macro and then once the
form has been used it will have the information in the cell so it would

not
be run again.

Thanks again any help is appreciated

Greg






 
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
Getting a macro to see the next available empty cell Mark 688 Excel Discussion (Misc queries) 1 September 9th 05 04:19 PM
macro to look for empty cell esrei Excel Discussion (Misc queries) 1 April 14th 05 11:57 AM
Need help with empty cell in Macro Don Excel Programming 4 September 30th 04 02:50 AM
if cell empty hide row macro? Todd Excel Programming 2 June 18th 04 07:18 PM
Make macro go to first empty cell in column? TiggerTwo Excel Programming 5 February 24th 04 12:34 AM


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