SpinButton freezer

BrianReis

New Member
Joined
Jun 12, 2017
Messages
3
Hello, i have been working with VBA in Solidworks but i believe my question still applies

I started using a spinbutton in my form to add a value in the textBox, so far so good, had no problems
Everything runs smothly in my form until i press the spin button, because when i do i cant press anything else from the form (close button, tab button, anyother button that is not the spin button.)
The only way to make the form work again is to select a textBox and then i am free from the claws of the SpinButton

Does anyone know why this happens?
Its a pain for the user to have to allways press a box (wich i wanted to disable) in order to continue

Thanks in advanced guys
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
That shouldn't be the case. Do you have some code to post showing what happens when you press the spin button. Maybe your code is causing an event in the textbox and looping endlessly.

Jeff
 
Upvote 0
I can put the code here tomorrow
Doesnt seem like a endless loop cause when i click on a textbox i would be able to do everything again
Over the day i managed to work things out. Basically, when i click the spinbutton i hide my form, run the code, and then when its done i show the form again and it all works good
 
Upvote 0
That shouldn't be the case. Do you have some code to post showing what happens when you press the spin button. Maybe your code is causing an event in the textbox and looping endlessly.

Jeff


This is what i put inside:

Private Sub SpinComp_Change()
txtComp.Text = SpinComp.value
Comp = txtComp.Text
DesenhaVectores
End Sub

Desenhavetores is a function that will draw lines in the solidworks
It worked but it was blocking my form after running (if i run the desenhavetores outside this spinbutton the form does not get blocked)


This is how i managed to resolve the situation

Private Sub SpinComp_Change()
Me.Hide


txtComp.Text = SpinComp.value
Comp = txtComp.Text
DesenhaVectores


Me.Show vbModeless
End Sub

This way works and the form doesnt get blocked but it seems like a bad way to do it


Thank you for your help in advanced
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top