PDA

View Full Version : VBA not to show excel file, excel logo, excel ico but only show a User form



nkpan
04-05-2018, 09:30 PM
Hi All,

I am not sure if this is possible,

I have a macro where the user only uses User From and excel is just a means to open it. is it possible that this macro should not show excel logo in the title, file icon, menu bar and not even the splash screen when i open it.

in short i dont want the user to know that this macro is made in excel vba.



Thanks a lot in advance, any help will be highly appreciated.

mancubus
04-06-2018, 05:24 AM
something to play with:

ThisWorkbook code module:


Private Sub Workbook_Open()
UserForm1.Show vbModeless
End Sub



UserForm1 code module


Private Sub UserForm_Initialize()
With Application
.Visible = False
.DisplayFullScreen = True
UserForm1.Width = .ActiveWindow.Width
UserForm1.Height = .ActiveWindow.Height
UserForm1.Move 0, 0
End With
End Sub


Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
ThisWorkbook.Close SaveChanges:=True
With Application
.Visible = True
.DisplayFullScreen = False
.Quit
End With
End Sub


Private Sub CommandButton1_Click()
Unload Me
End Sub

nkpan
04-08-2018, 08:51 PM
something to play with:

ThisWorkbook code module:


Private Sub Workbook_Open()
UserForm1.Show vbModeless
End Sub



UserForm1 code module


Private Sub UserForm_Initialize()
With Application
.Visible = False
.DisplayFullScreen = True
UserForm1.Width = .ActiveWindow.Width
UserForm1.Height = .ActiveWindow.Height
UserForm1.Move 0, 0
End With
End Sub


Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
ThisWorkbook.Close SaveChanges:=True
With Application
.Visible = True
.DisplayFullScreen = False
.Quit
End With
End Sub


Private Sub CommandButton1_Click()
Unload Me
End Sub




Thanks Mancubus,

this works well but any idea on how to change the Icon of the Excel File and how to stop the excel flash screen from displaying?

I am looking for something which should not show any bit of excel name, icon, flash screen.

Thanks a lot

mancubus
04-09-2018, 01:59 AM
welcome.

i am not sure i can follow you but see the attachment.

additional code in the uf's code module is lifted from:
http://www.excelfox.com/forum/showthread.php/539-Remove-UserForm-s-TitleBar-And-Frame