Scroll and Read Data In Rows - Microsoft Excel 2010 VBA Programming for Beginners (1 of 6).camrec

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

hey you're videos have been extremely helpful.
I feel really stupid asking this because I know it's probably a tiny error in the coding.
But I have my coding as the below:

Private Sub CommandButton1_Click()
row_number = 1
Do
DoEvents
    row_number = row_number + 1
    DTC = Sheet1.Range("E" & row_number)
    MsgBox DTC_data
    
    
    If row_number = 8 Then Exit Sub
    
Loop Until DTC = ""


End Sub

and the function works, but when it comes up with the screen it pops up with a blank message for the 8 rows, it doesn't actually read it for me.
(also some of the coding is slightly different from yours because it's for a spreadsheet at work.

thank you so much for your help!!!

brianmayer
Автор

I have tried this several times with a few different data sheets and I keep getting a run-time error on this line:
last_name_data = ShipmentDetail_Main.Range("A" & row_number)
It is saying that an object is required.
I have tried renaming the rows exactly how you have them and it still sticks me there. Do you know what my issue might be?

treysonmarks
join shbcf.ru