Answered by:
adding an ID number

Question
-
I put this together so i can create a date base the only think that i am having a problem is creating and ID number on column A.
I do have an exiting data so this will continue below that as the data gents entered need to fine the last ID number on column A and add the next number for a new ID number.
I don't know if i am in correct forum things have change since i was in this forums.
Anyway thank you for your help.
Kosta
Private Sub Save_Click()
Dim wks As Worksheet
Dim AddNew As Range
Dim lRow As Long
Set wks = Sheet1On Error Resume Next
Set AddNew = Cells.Find(What:="*", _
After:=Range("A1"), _
LookAt:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False)
Set AddNew = wks.Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
l
ActiveCell.Offset(1, 0) = ActiveCel + 1AddNew.Offset(0, 0).Value = TextCompanyNumber.Text
AddNew.Offset(0, 3).Value = TextCompanyName.Text
AddNew.Offset(0, 4).Value = TextAddress1.Text
AddNew.Offset(0, 2).Value = TextAddress2.Text
AddNew.Offset(0, 5).Value = TextCity.Text
AddNew.Offset(0, 6).Value = TextState.Text
AddNew.Offset(0, 7).Value = TextZip.Text
AddNew.Offset(0, 11).Value = TextZip4.Text
AddNew.Offset(0, 14).Value = TextTelephone.Text
AddNew.Offset(0, 18).Value = TextFax.Text
AddNew.Offset(0, 19).Value = TextEmailAddress.Text
AddNew.Offset(0, 30).Value = TextCompanyCode.Text
AddNew.Offset(0, 26).Value = TextTaxId.Text
AddNew.Offset(0, 27).Value = TextCreditcardNumber.Text
AddNew.Offset(0, 28).Value = TextCreditcardDate.Text
AddNew.Offset(0, 29).Value = TextCreditcardCode.Text
End Sub
Vforum
Sunday, October 13, 2019 8:16 PM
Answers
-
I'd try asking for help over here.
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-msoffice_custom
https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Richard MuellerMVP, Banned Sunday, October 13, 2019 9:28 PM
- Marked as answer by Richard MuellerMVP, Banned Sunday, October 20, 2019 8:17 PM
Sunday, October 13, 2019 8:56 PM -
You're welcome.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Marked as answer by Kosta si Monday, October 21, 2019 12:12 PM
Sunday, October 13, 2019 9:48 PM
All replies
-
I'd try asking for help over here.
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-msoffice_custom
https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Richard MuellerMVP, Banned Sunday, October 13, 2019 9:28 PM
- Marked as answer by Richard MuellerMVP, Banned Sunday, October 20, 2019 8:17 PM
Sunday, October 13, 2019 8:56 PM -
Thank you
Vforum
Sunday, October 13, 2019 9:32 PM -
You're welcome.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Marked as answer by Kosta si Monday, October 21, 2019 12:12 PM
Sunday, October 13, 2019 9:48 PM