ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check cell for data before running code (https://www.excelbanter.com/excel-programming/320656-check-cell-data-before-running-code.html)

Pat

Check cell for data before running code
 
I want to ensure G9 on a worksheet contains a value before the main body of
code is run. If G9 contains a value do not remind the user, if G9 does not
contain a value remind the user to enter a value in G9.
Anyone know what I need to enter at the start of a running code?
If anyone thinks I should approach this from a different angle please let me
know.

Thanks
Pat



anonymousA

Check cell for data before running code
 
hi,

the most simple of all but there are many others olutions than can let enter
something while you're running the program.

try this in the beginning of your program.
if isempty(cells(9,7) then
msgbox "you've got something to enter in G9 befor teh program runs"
exit sub
end if

So long

"Pat" a écrit dans le message de news:
...
I want to ensure G9 on a worksheet contains a value before the main body

of
code is run. If G9 contains a value do not remind the user, if G9 does not
contain a value remind the user to enter a value in G9.
Anyone know what I need to enter at the start of a running code?
If anyone thinks I should approach this from a different angle please let

me
know.

Thanks
Pat






All times are GMT +1. The time now is 10:42 AM.

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