Link to home
Start Free TrialLog in
Avatar of daiwhyte
daiwhyteFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Frameless Excel Spreadhseet?

Hi Chaps,

I have a spreadsheet which pulls data from our CRM, Im wondering if its possible to launch the spreadsheet so its frameless? I only want to show the sheet itself and not the buttons/toolbars.

Thanks
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia image

Use this in the Workbook_Open event....

    Application.DisplayFullScreen = True

Be sure to set it back to false in the BeforeClose event.

Wayne
Without the toolbars, how is the user going to close the workbook?

Patrick
Avatar of daiwhyte

ASKER

All I want is the frame around the workbook which will have the standard X in the top right corner. The excel sheet is quite small so I dont want it to go full screen, just the size of the worksheet.
Paste the below into a regular module. Then call the "HideToolbars" sub from the Workbook_Open event, and the "ShowToolbars" sub from the Workbook_BeforeClose event.

Wayne
Public OrigCommandBars As Collection

Sub HideToolbars()
    Set OrigCommandBars = New Collection
    Dim cb As CommandBar
    For Each cb In Application.CommandBars
        If cb.Visible Then
            If cb.Name <> "Worksheet Menu Bar" Then
                cb.Visible = False
                OrigCommandBars.Add cb.Name
            End If
        End If
    Next
    Application.DisplayFormulaBar = False
End Sub

Sub ShowToolbars()
    Dim cb
    For Each cb In OrigCommandBars
        Application.CommandBars(cb).Visible = True
    Next
    Application.DisplayFormulaBar = True
End Sub

Open in new window

In the ribbon, just go to View, Full Screen?
cyberkiwi, check the tags - XL 2003 doesn't have a ribbon. Plus I had already mentioned FullScreen, which apparently isn't desirable.
@webtubbs > check the tags - XL 2003

Thanks, I missed that.
There is still Menu->View->Full Screen.  For what it's worth, I am wondering if the author is just after a simple solution and all I see before my post are some VBA solutions.
You may be right, but the only way to "launch the spreadsheet so its frameless" is to use VBA. Full screen only applies to the Application window and is not remembered by a workbook. Plus it has already been eliminated as an option- http:#a33566135
I stand to be corrected, but I read that as:

All I want is the frame around the workbook which will have the standard X in the top right corner. => bare minimum.  The X is on the same row as the menu (not toolbar/buttons), so that has to remain.

The excel sheet is quite small so I dont want it to go full screen, just the size of the worksheet. => one of two things
(1) Full screen as in video, frameless borderless, not even the X (see above)
(2) Full screen as in zoomed in to fill full screen size (don't want). Just want worksheet (area) expanded.
Could be a misunderstanding of the term "full screen"

It really depends on your experience as to how you read it, and I could well be barking up the wrong tree.
Ok, a little lost here guys. Im guessing I need to do something with the VB editor but Im not sure what needs inserting where? Can you give me a bit more help guys?
Do you just want the borders and toolbars removed, leaving the Excel window with just Menu and [X] at the top and worksheet area filling the rest of the screen?  If this is one-off, you can go to Menu->View->Full Screen.

Otherwise webtubbs can give you the VBA method.
daiwhyte,

The problem with doing that is that once the command bars are hidden then that applies to all workbooks that are open on that machine. If however only that one workbook is open then you could use the code below to hide or show all the command bars. Adapt the amcros to workbook_open() sub if needed.

Patrick

Sub a_hides_commandbars()
Dim cbar As CommandBar

For Each cbar In CommandBars
    If cbar.Enabled = True Then
        cbar.Enabled = False
    End If
Next cbar

End Sub

Sub a_shows_commandbars()
Dim cbar As CommandBar

For Each cbar In CommandBars
    If cbar.Enabled = False Then
        cbar.Enabled = True
    End If
Next cbar

End Sub

Open in new window

cyberwiki, your solution is not what Im after (just tried it). Looks like its the VB method.
Is it possible to set the window location of this screen within the vb also?
Wayne,

Apologies - I never even saw your contribution until just now. Much better than mine anyhow.

Patrick
>Ok, a little lost here guys. Im guessing I need to do something with the VB editor but Im not sure what needs inserting where? Can you give me a bit more help guys?

To install a sub in a module:

1) Press ALT+F11
2) Find the workbook name in the VBAProject window (CTRL+R if it's not visible), right-click on the file name
3) Select Insert/Module
4) Double click on the new Module
5) Paste the code into the Module
6) ALT + F11 to return to the worksheet
7) ALT + F8 to select and run the macro
Ok, Ive inserted the sub but its removed the toolbars from all instances of excel. This will affect some users who use the toolbar for day to day functions. Is it not possible to assign the vb just to the spreadsheet Im opening?

>Ok, Ive inserted the sub but its removed the toolbars from all instances of excel. This will affect some users who use the toolbar for day to day functions. Is it not possible to assign the vb just to the spreadsheet Im opening?

I told you earlier that would happen, so it should have come as no surprise to you. There is no way of overcoming that problem.
Mmm, ok fair enough - in that case I think we have probably solved this problem the best we can.

I think if we split points between Patrick and Wayne?
>I think if we split points between Patrick and Wayne?

Wayne really as he provided the good answer.
ASKER CERTIFIED SOLUTION
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Wayne.