How about unloading the userform after it is clicked
Sub CommandButton_Click()
"your code"
unload userform1
end sub
Steve,
That would work if i only had 1 button, but i have several and need
the UserForm to stay on the screen
Regards
Jim
How about changing the Enabled property of the command buttons? For example, you could have a line of code
Commandbutton1.Enabled=False
Commandbutton2.Enabled=False
'Now carry out various calculations
Commandbutton1.Enabled=True
Commandbutton2.Enabled=True
How about that?
Regards,
Dax.
Hi jim
Ok then maybe something like this
What I'm thinking is after the button is pushed you can have it chabge a cell somewhere in a worksheet to true(Lets say sheet1 cell "a1"
Then maybe try something like this
Sub CommandButton_Click()
If sheet1.range("A1")=true then
"your code"
end if
end sub
Then what you can do is on the userforn activate code have it change A1 to false.
Private Sub UserForm_Activate()
sheet1.range("A1")=false
End Sub
I have not tested this but I think it will work
let me know
steve w
hi jim
Sub CommandButton1_Click()
"your code"
Commandbutton1.Enabled=False
end sub
steve w
Thanks, Steve you nailed It!