#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Run macro Once

Can anyone let me know how to get this code to work when there is a null
entry in X1...

Worksheets("qry_aga_corps").Activate
Range("X1").Select
If ActiveCell isnull Then

"Run Code"

Else
MsgBox ("The Macro has already been activiated once, cannot run
twice")
End If

Regards - Paul


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Run macro Once

with Worksheets("qry_aga_corps")
if len(trim(Range("X1")))<1 then
"Run Code"
'I assume that code puts somehing in cell x1
Else
MsgBox ("The Macro has been run once, cannot run twice")
End If


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"PR" wrote in message
...
Can anyone let me know how to get this code to work when there is a null
entry in X1...

Worksheets("qry_aga_corps").Activate
Range("X1").Select
If ActiveCell isnull Then

"Run Code"

Else
MsgBox ("The Macro has already been activiated once, cannot run
twice")
End If

Regards - Paul


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Run macro Once

Don,
Many thanks for your help and your time it works...

regards Paul


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Run macro Once

Glad to help.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"PR" wrote in message
...
Don,
Many thanks for your help and your time it works...

regards Paul


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
need help to update macro to office 2007 macro enabled workbook jatman Excel Discussion (Misc queries) 1 December 14th 07 01:57 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM


All times are GMT +1. The time now is 01:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"