View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default What is the proper dot.syntax to insert a select case within a With / End With Statement

How do I incorporate your statement
Select Case CLng(.Range("A2:A" & LRow).Value)

into my actual Select Case macro
Sub Test()
Dim LRow As Long
Dim rngC As Range
Dim myStr As String
With ActiveSheet
LRow = .Cells(Rows.Count, 1).End(xlUp).Row
For Each rngC In .Range("M3:M" & LRow)


Select Case CLng(rngC.Value)

Case Is < 63 '
myStr = Format(rngC, "000")
Format Error here when actual data can be 002, 063 or 386.
My Data type is 1
Thank you for your help.
J.P.


--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion