changing pic on button

fullymooned

New Member
Joined
Apr 1, 2004
Messages
10
I have two buttons A->Z and Z->A. The latter is invisible first When i click on A->Z , it should do the operation, make it invisible and make Z-> A visible

so the code I have so far si
sub sortasc_click()
sortdesc.visible = false
do the operation
sortasc.visible = false
end sub

I get an error which says i cant make sortasc_click invisible while it is active

does any one know to i can solve this

thank you
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
You could try:

Code:
sub sortasc_click() 
   do the operation 
   sortasc.visible = false
   sortdesc.visible = true
end sub
That way, the operation happens first and you have usually moved the focus from the sortasc button. Also, I assume you want sortdesc to be visible :biggrin:

Denis
 
Upvote 0

Forum statistics

Threads
1,221,692
Messages
6,161,351
Members
451,697
Latest member
pedroDH

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