Userform Canellation.
Hi,
Please give us your code so we can clearly understand it.
if you are putting your code to transfer the data under the textbox or
combobox change event it will not write it your cell unless you press
your OK button.
If I have textbox1 and commandbuuton1 in a user form then
The value of textbox1 will be entered in sheet1 range A1 only when i
press the commandbutton1 using the following code
Private Sub CommandButton1_Click()
Sheets("Sheet1").Range("A1") = TextBox1.Value
End Sub
Thanks
Corey wrote:
I am creating a userform with hlp from some other forum users.
I have just noticed that when a value is placed intop a textbox, or
combobox, the sheet that those values WILL be placed in from the userform
are being input in the background as typing of the values is carried out.
This is nopt a problem.(But thought application.screenupdating = false)
removes this, but If i need to cancel the userform via the Cancel
button(unload me),
I then have to nagivate to the sheet and manually clear the data the
userform was putting in the cells.
1. How do i prevent the data being placed into the sheet UNTIL the OK button
is clicked,
or
2. How do i have the data entered into the userform cleard from the sheet IF
i click cancel ?
Corey....
|