You are currently viewing the Excel VBA section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
Here I am trying to add form data into Excel sheet 2
i written this code but giving problem
anybody suggest to me
Do While (Worksheets(2).Cells(row, col1) = "")
If Worksheets(2).Cells(row, col1) = "" And Worksheets(2).Cells(row, col2) = "" And Worksheets(2).Cells(row, col3) = "" And Worksheets(2).Cells(row, col4) = "" Then
Worksheets(2).Cells(row, col1) = name
Worksheets(2).Cells(row, col2) = datefrom
Worksheets(2).Cells(row, col3) = dateto
Worksheets(2).Cells(row, col4) = reason
Exit Sub
ElseIf Worksheets(2).Cells(row, col1) <> "" And Worksheets(2).Cells(row, col2) <> "" Then
row = row + 1
End If