Seamus2626
asked on
Toggle button
Hi,
I have two subs "Full" and "Small"
I have two buttons for these subs (they determine whether excel is in full screen mode or not)
I would like one button that defaulys on entry to the spreadsheet to "Small" then if that is clicked, changes to "Full"
This is to make the spreadsheet cleaner
Many thanks
Seamus
I have two subs "Full" and "Small"
I have two buttons for these subs (they determine whether excel is in full screen mode or not)
I would like one button that defaulys on entry to the spreadsheet to "Small" then if that is clicked, changes to "Full"
This is to make the spreadsheet cleaner
Many thanks
Seamus
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No, it's Excel and VBA. VB is a separate application - it's part of Visual Studio, or a 12 year old application, It's very important to get that terminology right, otherwise people might think that you are trying to interact Visual Studio with Excel.
So, now I know what you are talking about, please find attacehd a sample workbook with that button.
The VBA is as follows:
So, now I know what you are talking about, please find attacehd a sample workbook with that button.
The VBA is as follows:
Sub Button1_Click()
With ActiveSheet.Shapes("Button 1").TextFrame.Characters
If .Text = "Small" Then
.Text = "Full"
Else
.Text = "Small"
End If
End With
End Sub
MacroButton.xlsm
Writting this freehand in this window so may need tweaks, but somthign like this called on Button click ..
sub ChangeButton()
If MyButton.Cation="Small" then
MyButton.Cation="Full"
'do somthign in code here to call the FULL methods.
Full()
else
MyButton.Cation="Small"
'do somthign in code here to call the SMALL methods.
Small()
end if
End Sub
ASKER
RE the correct terminology, i understand now
The toggling is perfect, however, i need the buttons to call the sub as well.
So in the uploaded file i am when "return to excel" is pressed i want sub "small" called, when "Full Screen" is pressed, i want "Full" called
Many thanks
Seamus
Copy-of-MacroButton.xlsm
The toggling is perfect, however, i need the buttons to call the sub as well.
So in the uploaded file i am when "return to excel" is pressed i want sub "small" called, when "Full Screen" is pressed, i want "Full" called
Many thanks
Seamus
Copy-of-MacroButton.xlsm
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Guys!
ASKER
Thanks