Minimising Excel

dornan

New Member
Joined
Jun 26, 2002
Messages
9
Hi is it possible to minimise Excel (the application) through a Macro? Basically I have a live rates feed going into it and I don't want it to come up on the screen so when it's opened I would like it to minimise automatically!! Sounds Lazy but the PC it runs on is in a secure room and there is a slave screen that other people look at and I don't want them to see the excel spread sheet!

Thanks in advance.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Colo

MrExcel MVP,
Joined
Mar 20, 2002
Messages
1,456
Hi dornan,
It's possible to make Excel application minimise, but other people can see the spread sheet if they click the Excel icon on Task bar.
So, you don't want to show the spread sheet, why don't you make a blank sheet and hide other spread sheet?
Here is thecode I wrote just as sample.
To see other spread sheet, double click on the Dummy sheet and enter password.
This time, password is "password". And please note, make sure protect the VBAProject.

<pre>
'Put these code on Thisworkbook modele
Const PASSWORD As String = "password" 'change this as you like
Const strDummyWs As String = "Dummy" 'change this as you like
Dim wsDummy As Worksheet
Dim ws As Worksheet
Private Sub Workbook_Open()
Set wsDummy = Sheets.Add
On Error Resume Next
Application.DisplayAlerts = False
Sheets(strDummyWs).Delete
Application.DisplayAlerts = True
On Error GoTo 0
wsDummy.Name = strDummyWs
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> wsDummy.Name Then
ws.Visible = xlSheetVeryHidden
End If
Next
Set wsDummy = Nothing
End Sub

Private Sub Workbook_SheetBeforeDoubleClick _
(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
Dim strPw As String
If Sh.Name <> "Dummy" Then Exit Sub
strPw = InputBox("Please inoput password")
If strPw <> PASSWORD Then Exit Sub
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> strDummyWs Then
ws.Visible = xlSheetVisible
Else
Set wsDummy = ws
End If
Next
Application.DisplayAlerts = False
wsDummy.Delete
Application.DisplayAlerts = True
Set wsDummy = Nothing
End Sub
</pre>
 

Forum statistics

Threads
1,143,702
Messages
5,720,375
Members
422,281
Latest member
jantoooh

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
Top