What is wrong

deanl33069

Board Regular
Joined
May 2, 2019
Messages
120
Application.Worksheets("Sheet5").DisplayFullScreen = True
keep getting subscript out of range error
plz help
 

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
How about
Code:
Application.DisplayFullScreen = True
 
Upvote 0
Just select that sheet first, i.e.
Code:
[COLOR=#333333]Sheets("Sheet5").Activate
[/COLOR]Application.DisplayFullScreen = True
 
Upvote 0
Tried it but got nowhere here is my complete code.....it is in a form if that make a difference

tyvm


Private Sub commandButton1_Click()
Sheets("Sheet5").Activate
Application.DisplayFullScreen = True
Application.CommandBars("Full Screen").Visible = False
'Range("C2").Select
Range("C2").ClearContents
Range("n2").ClearContents
Range("b5").ClearContents
Range("c3").ClearContents
Range("a6:a460").ClearContents
' Range("C2").Select
Me.Hide







End Sub
 
Upvote 0
What is it exactly that you are trying to accomplish?
I seldom work with Forms (I find them rather cumbersome in Excel, and prefer to use Access if I need Forms), but try putting those two lines AFTER the "Me.Hide" line.
 
Upvote 0
You are welcome.

I just find them a bit cumbersome to work with, as you need to explicitly link them to Excel using VBA. In Access, form fields can automatically be "bound" to table and query fields (no need to manually map them).
 
Upvote 0

Forum statistics

Threads
1,214,530
Messages
6,120,071
Members
448,943
Latest member
sharmarick

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