Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making Excel look like a stand alone

Status
Not open for further replies.
Feb 9, 2004
14
KR
Is it possible to change the icon in the top left corner of the screen??
Is it possible to change the header text so it doesn't say microsoft excel?
Is it possible to get rid of the numbered rows and lettered columns?
Anyone have any tips for making excel look as much like it isnt excel as possible?? (i know this sounds stupid, but a lot of beginners are going to use this and some are 'scared' of excel)
 
you could place the excel page in a webpage, and then place the title in the webpage title. This will also mean that the page is in a single web page, and not in the excel MDI form.

Alternatively, if you have vb, you could place the excel control on a custom made form which you create in vb. This way, you can control what the user can see and what they can't.

Anything is possible, it just takes time, money, or both.

BB
 
You may want to look into using "UserForms" and making excel invisible (application.visible = false) - this is something I have done in the past when I didn't want users to figure out they were just using Excel

Other than that - column and row headers can be removed by going Tools>Options>View

API calls would be needed to change the header text and I'm not sure if the icon can be got rid of....

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
There is a way of changing the icon with an API call if i remember correctly, do a search on google see if you get any luck with API Call Excel Application logo . if you dont have any luck im sure i have it in a book somewhere and i will dig the code out for you

Filmmaker, gentleman and Ambasador for London to the sticks.

 
[tt]Application.Caption="Cust. App Name"[/tt] replaces 'Excel' by custom name, [tt]ThisWorkbook.Windows(1).Caption="Cust. Doc Name"[/tt] replaces workbook's name.

combo
 
Hi
It's quite a big question to answer quickly - changing the way Excel looks but the following will demonstrate some of the things you can do. Most of these you would be able to get using the macro recorder but some you wouldn't!

(I was planning a FAQ on this so I'm building a demo anyway!)

Code:
Sub SomeApplicationAndWindowProperties()
Worksheets(1).Activate
'APPLICATION SETTINGS
With Application
    If UCase(Left(.OperatingSystem, 3)) <> "MAC" Then
        .Caption = "Custom Application"
         MsgBox "Application.Caption = ""Custom Application"""
    End If
    .DisplayScrollBars = False
    MsgBox "Application.DisplayScrollBars = False"
    .DisplayFormulaBar = False
    MsgBox "Application.DisplayFormulaBar = False"
    .DisplayStatusBar = False
    MsgBox "Application.DisplayStatusBar = False"
    .DisplayStatusBar = True
    MsgBox "Application.DisplayStatusBar = True"
    .StatusBar = "Custom Status Bar Message"
    MsgBox "Application.StatusBar = " _
        & """Custom Status Bar Message"""
    .ScreenUpdating = False
    If UCase(Left(.OperatingSystem, 3)) <> "MAC" Then
        .WindowState = xlNormal
        .Height = 200
        .Width = 200
        .Top = 100
        .Left = 100
        .ScreenUpdating = True
        MsgBox "Application.ScreenUpdating = False" & Chr(13) & _
               "Application.WindowState = xlNormal" & Chr(13) & _
               "Application.Height = 200" & Chr(13) & _
               "Application.Width = 200" & Chr(13) & _
               "Application.Top = 100" & Chr(13) & _
               "Application.Left = 100" & Chr(13) & _
               "Application.ScreenUpdating = True"
        .WindowState = xlMaximized
        MsgBox "Application.WindowState = xlMaximized"
        .Caption = Empty
    End If
    'Reset settings
    .DisplayScrollBars = True
    .DisplayFormulaBar = True
    .StatusBar = False
    '.DisplayAlerts = False
    '.Quit
End With

'some WINDOW SETTINGS
With ActiveWindow
    .DisplayWorkbookTabs = False
    MsgBox "ActiveWindow.DisplayWorkbookTabs = False"
    .DisplayGridlines = False
    MsgBox "ActiveWindow.DisplayGridlines = False"
    .DisplayHeadings = False
    MsgBox "ActiveWindow.DisplayHeadings = False"
    .DisplayHorizontalScrollBar = False
    MsgBox "ActiveWindow.DisplayHorizontalScrollBar = False"
        If UCase(Left(Application.OperatingSystem, 3)) <> "MAC" Then
            .WindowState = xlNormal
            .Height = 100
            .Width = 100
            .Top = 50
            .Left = 50
            MsgBox "ActiveWindow.WindowState = xlNormal" & Chr(13) & _
                   "ActiveWindow.Height = 100" & Chr(13) & _
                   "ActiveWindow.Width = 100" & Chr(13) & _
                   "ActiveWindow.Top = 50" & Chr(13) & _
                   "ActiveWindow.Left = 50"
            .WindowState = xlMaximized
            MsgBox "ActiveWindow.WindowState = xlMaximized"
        End If
    
    'reset
    .DisplayWorkbookTabs = True
    .DisplayGridlines = True
    .DisplayHeadings = True
    .DisplayHorizontalScrollBar = True
End With
End Sub

As for changing the Application icon I'm not sure but the following API will remove it completely. It also has the added bonus/setback of removing the Minimize/Restore/Close buttons from the application

Code:
Declare Function FindWindowA Lib "user32" ( _
    ByVal lpClassName As Any, _
    ByVal lpWindowName As Any) As Long
Declare Function GetWindowLongA Lib "user32" ( _
    ByVal hWnd As Integer, _
    ByVal nIndex As Integer) As Long
Declare Function SetWindowLongA Lib "user32" ( _
    ByVal hWnd As Integer, _
    ByVal nIndex As Integer, _
    ByVal dwNewLong As Long) As Long
Global Const GWL_STYLE = (-16)
Global Const WS_SYSMENU = &H80000

Sub RemoveControlMenu()
Dim WindowStyle As Long
Dim hWnd As Long
Dim WindowName As String
Dim result
WindowName = Application.Caption
hWnd = FindWindowA(0&, ByVal WindowName)
WindowStyle = GetWindowLongA(hWnd, GWL_STYLE)
WindowStyle = WindowStyle And (Not WS_SYSMENU)
result = SetWindowLongA(hWnd, GWL_STYLE, WindowStyle)
End Sub


Sub RestoreControlMenu()
Dim WindowStyle As Long
Dim hWnd As Long
Dim WindowName As String
Dim result
WindowName = Application.Caption
hWnd = FindWindowA(0&, ByVal WindowName)
WindowStyle = GetWindowLongA(hWnd, GWL_STYLE)
WindowStyle = WindowStyle Or WS_SYSMENU
result = SetWindowLongA(hWnd, GWL_STYLE, WindowStyle)
End Sub

I really should get a life!!
;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Thanks everyone for all your great advice! I was able to do a lot of what I wanted to. One thing I could not figure out, even with some extensive web searching, is how to change the icons in excel. The Icons that I am trying to alter are the application icon (the one you click on to open the file) and the excel icon in the uppermost left handed corner. If anyone can offer up advice or code, please.

Muchas gracias and Happy Easter! -RM
 
XLBO.... i've thought of this, but XL still loads first no? and unless you have signed certificate, or no security, user still prompted to approve / enable macro no?
Does incoropoarting as an addin resolve this? Or is that what you still meant and if not how are you able to resolve that simply a userform loads only (emulating a standalone app only)?

[yinyang] Tranpkp [pc2]
 
Tranpkp - it involves opening the "app" from another workbook. Splash screen on workbook A which enables user to open one of various "apps" - when called from code, you can easily create a new instance of excel and keep it invisible. Also, because macros have already been enabled, the user shouldn't get prompted

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top