View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
JHusker JHusker is offline
external usenet poster
 
Posts: 3
Default Macro to If Statement

How do you write an IF into VB?

"Sean Timmons" wrote:

May as well put the If into your VB.

Wherever the macro is,
Private Sub macroname()
'comments
Put your IF x Then
Macro code
End If
End Sub

"JHusker" wrote:

I want to assign a macro to an if statement. After I've recorded the macro,
how do I assign it to the "=if" formula?

Thanks in advance for the help!

~Joe