basically I cant get the equivalent of the RIGHT formula to work in VBA... Heres what i am trying to do:
I have a textbox on a form that gets populated with the string: "INCIDENT ID#: 18-389" Where the '389' part is increased by 1 each time the form is opened (when opened it checks for the largest value in a column on the sheet and then adds '1'.) So all that works fine... but
When I go to copy the data on the userform to the spreadsheet (this is done when the user selects a commandbutton for "add incident to log" at the bottom of the form)
The code for doing this is:
now this all works fine, but I need to exclude the text "INCIDENT ID#: 18-" and just capture the last 3 characters of the textbox which in this example would be "389".
How is this accomplished?? Thank you
Here is a pic of the form when its first opened with the textbox showing the example string "INCIDENT ID#: 18-389"
I have a textbox on a form that gets populated with the string: "INCIDENT ID#: 18-389" Where the '389' part is increased by 1 each time the form is opened (when opened it checks for the largest value in a column on the sheet and then adds '1'.) So all that works fine... but
When I go to copy the data on the userform to the spreadsheet (this is done when the user selects a commandbutton for "add incident to log" at the bottom of the form)
The code for doing this is:
Code:
.Cells(llRow, 1).Value = Me.txtIncidentID.Value
now this all works fine, but I need to exclude the text "INCIDENT ID#: 18-" and just capture the last 3 characters of the textbox which in this example would be "389".
How is this accomplished?? Thank you

Here is a pic of the form when its first opened with the textbox showing the example string "INCIDENT ID#: 18-389"
