Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Howard Dixon   on Nov 14 In MS Office Category.

  
Question Answered By: Geena Ma.   on Nov 14

I am doing this and I believe I have overcome some of the
issues... I have run into another though... I have added the second
page of the multipage form  and have figured out how to identify and
activate the worksheet affiliated to each page of the multipage
form... but when I try to add the information captured on the second
page of the multipage form, I get an error that its'
an invalid record... I copied/updated code I used for the first
worksheet making it applicable to the second page of the multipage
form specifically. The code to add the information to the
spreadsheet is:

Public Function SubSiteSave()
Dim R As Long

If IsNumeric(RowNumber.Text) Then
R = CLng(RowNumber.Text)

Else
MsgBox "Illegal row number"
Exit Function

End If

If R > 1 And R <= LastRow Then
strProtocolID = Worksheets("IVRSInfoSheet").Range("A2")
Cells(R, 1) = strProtocolID
Cells(R, 2) = cmboxSiteID.Text
Cells(R, 3) = txtSubSiteID
Cells(R, 4) = lstboxSalutation
Cells(R, 5) = txtPersonRcvDSRFirstName
Cells(R, 6) = txtPersonRcvDSRLastName
Cells(R, 7) = txtShipAddress1
Cells(R, 8) = txtShipAddress2
Cells(R, 9) = txtShipAddress3
Cells(R, 10) = txtShipAddress4
Cells(R, 11) = txtShipAddressCity
Cells(R, 12) = txtShipAddressState
Cells(R, 13) = txtShipAddressZip
Cells(R, 14) = txtShipAddressPhoneNumber
Cells(R, 15) = txtShipAddressFaxNumber
Cells(R, 16) = txtShipAddressEmailAddress
Cells(R, 17) = ComboBox1
Cells(R, 18) = ComboBox2
Cells(R, 19) = ComboBox3
Cells(R, 20) = ComboBox4


ActiveWorkbook.Save
disablesssave

Else
MsgBox "Invalid row number"

End If
End Function

I am sure the issue is that the R is not seen as >1 and <= LastRow....

Can you help  please?

Share: 

 

This Question has 14 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Multi-tab form Or get search suggestion and latest updates.


Tagged: