Userform stumped

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.

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
 
Sorry about that. The password has been fixed and data has been added.

I was showing you what I have because I'm not sure I completely understand
what you are referring to.

Not all the buttons work because I didnt bring all the code over to the
sample workbook for those buttons. They are just print buttons, Index,
and the send button. All the rest work, Insert, Edit, Insert Date, and Clear.

Im really interested to see what you mean about the data storage. Im trying
to find one on google but am having very little luck.

Heres the link
https://files.me.com/donaber/1b0ezr
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
So I'm more educated now. Wouldn't it be a good idea to give it the coords, when Im telling it to look for a empty cell somewhere in this code?

Code:
     HeaderRow = PHZ1.Range("HeaderRow").Row
                RowNum = HeaderRow + 1
            Do While PHZ1.Cells(RowNum, 2) <> ""
                RowNum = RowNum + 1
            Loop
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,459
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top