Thread
:
Compile Error: Block If without End if
View Single Post
#
10
Posted to microsoft.public.excel.programming
Tom Ogilvy
external usenet poster
Posts: 27,285
Compile Error: Block If without End if
Say it ain't so; another bottom feeding multiposter? <g
--
Regards,
Tom Ogilvy
"Dave Peterson" wrote in message
...
See one more post at your thread in .misc.
(Hi, Tom!)
wrote:
This is my first time using a Microsoft Excel Macro and I'm trying to
run the following code and keep getting the:
Compile Error: Block If without End if message and I can't figure out
why
Sub P()
'
' Macro1 Macro
' Changing FedEx Descriptions
'
' Keyboard Shortcut: Ctrl+Shift+X
'
If Range("K2:K999").Select = "02" Then
Range("M2:M999").Select = "FedEx Ground"
Else
If Range("K2:K999").Select = "03" Then
Range("M2:M999").Select = "FedEx 2Day"
Else
If Range("K2:K999").Select = "" Then
Range("M2:M999").Select = ""
End If
End Sub
--
Dave Peterson
Reply With Quote
Tom Ogilvy
View Public Profile
Find all posts by Tom Ogilvy