View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers
 
Posts: n/a
Default Validate before running macro

Something like .... ?

If isempty(yourcell) then
Msgbox "Run aborted"
exit sub
End if

"ChrisMattock" wrote:


Hi all,

Have an issue.... I have a spreadsheet that on running a macro opens a
word document and fills in bookmarks with info from cells. But if the
buuton is clicked when a cell is empty the I want the macro to abort
and put up an error message, could someone tell me how to do this?
Thanks!


--
ChrisMattock
------------------------------------------------------------------------
ChrisMattock's Profile: http://www.excelforum.com/member.php...o&userid=33912
View this thread: http://www.excelforum.com/showthread...hreadid=554511