FoRmEd
Board Regular
- Joined
- Jan 29, 2011
- Messages
- 72
Next Clear Cell using .Select
Am I correct when assuming .Select can be used when using a range of cells, then when that range of cells is full, move to the next defined Range of cells.
So maybe something like this.
Am I correct when assuming .Select can be used when using a range of cells, then when that range of cells is full, move to the next defined Range of cells.
So maybe something like this.
Rich (BB code):
Sub cmdAdd_Click()
ActiveSheet.Unprotect Password:="*"
If Me.textCIS = "" Then
MsgBox ("Enter a valid CIS Number")
Else
' identify workspace locations
' this part im unsure about and it wont debug
' these are the seperate named ranges but I dont
' now where to add them
HeaderRowP1 = PHZ1.Range("HeaderRowP1").Row
CIScol = PHZ1.Range("CIScol,CIScol2,CIScol3,CIScol4").Cells
CLSDcol = PHZ1.Range("CLSDcol,CLSDcol2,CLSDcol3,CLSDcol4").Cells
Addtcol = PHZ1.Range("Addtcol,Addtcol2,Addtcol3,Addtcol4").Cells
Routecol = PHZ1.Range("Routecol,Routecol2,Routecol3,Routecol4").Cells
FLIPcol = PHZ1.Range("FLIPcol,FLIPcol2,FLIPcol3,FLIPcol4").Cells
RowNum = HeaderRowP1 + 1
' I got it passed that debug but it stops here
Do While PHZ1.Cells(RowNum, CIScol) <> ""
RowNum = RowNum + 1
Loop
End If
ActiveSheet.Protect Password:="*"
End Sub