This code displays data in Userform1 on the active sheet(in the background [showmodal = false]
Userform1 is fired from a QAT button with Sheet2 or any sheet being the Activesheet. The problem is, the Textboxes are populated with data from Sheet2 or the Activesheet. I don't want that. I want Userform1 to ALWAYS display data from Sheet1 regardless of which sheet I'm on
Another way of saying this is, every time I change the sheet and click the QAT button, it fills the textboxes with data from that active sheet, which gives meaningless information. How do I keep Userform1 to always display data from Sheet1 ?
Thanks for anyone's help.
cr
Code:
Private Sub UserForm_Initialize()
currentrow = 2 'currentrow is a global variable of type Long
lastrow = Sheets("REGISTER").Range("A" & Rows.count).End(xlUp).Row
TextBox1 = Cells(currentrow, 1)
TextBox2 = Cells(currentrow, 2)
TextBox3 = Cells(currentrow, 3)
TextBox4 = Cells(currentrow, 6)
TextBox5 = Cells(currentrow, 7)
Another way of saying this is, every time I change the sheet and click the QAT button, it fills the textboxes with data from that active sheet, which gives meaningless information. How do I keep Userform1 to always display data from Sheet1 ?
Thanks for anyone's help.
cr