This code does not work right every time.. Sometimes notes and/or changes in Textbox2 of Userform1 are posted to the correct Sheet row cell ,and sometimes the notes posts at the very top in row 2 when the Save button is clicked. I cannot figure out why its doing this. It should post changes to the correct cell row and column every time all the time.
Does it have to do with the code being able to identify the correct row number in the sheet cell that is being displayed in the userform that the user is making a note in the textbox in.? I did not put this lastrow code line in the code block below because I didn’t think it was necessary – thinking, what does the lastrow have to do with finding the current row?
This is the simple one line of code below that's supposed to save Textbox2 note to the correct cell row in column C
I did look for solutions and all that keeps coming up from Stack Overflow and ChatGPT (which gets its solutions from ChatGPT most of the time)
and all I get are long lines of code that use a For Loop . I tend to stay away from a For loop if I can, but I'm not opposed to it if that solves this problem.
I put images in the sheet and where this line of code takes the note randomly. All this is done from a button click.
Any help and guidance on this - which seems very simple to fix - will be very much appreciated.
Thanks, cr
Does it have to do with the code being able to identify the correct row number in the sheet cell that is being displayed in the userform that the user is making a note in the textbox in.? I did not put this lastrow code line in the code block below because I didn’t think it was necessary – thinking, what does the lastrow have to do with finding the current row?
Code:
lastrow = Sheets("BIBLETEXT").Cells(rows.count, 1).End(xlUp).Row
This is the simple one line of code below that's supposed to save Textbox2 note to the correct cell row in column C
Code:
Private Sub cmdSAVE_Click()
Sheets("BIBLETEXT").Cells(rowno, 3) = TextBox2
I did look for solutions and all that keeps coming up from Stack Overflow and ChatGPT (which gets its solutions from ChatGPT most of the time)
and all I get are long lines of code that use a For Loop . I tend to stay away from a For loop if I can, but I'm not opposed to it if that solves this problem.
I put images in the sheet and where this line of code takes the note randomly. All this is done from a button click.
Any help and guidance on this - which seems very simple to fix - will be very much appreciated.
Thanks, cr