View Full Version : Solved: .Application.Visible = False
morteza2006
02-03-2013, 01:51 AM
Hi all
I've provided a file and write the following code
Private Sub Workbook_Open()
Windows("stiky not.xlsm").Application.Visible = False
userform1.show
End Sub
But when I open a file in another Excel file can be seen in the page
Is there any way to hide files, Excel Page not found?
Simon Lloyd
02-03-2013, 05:49 AM
what do you mean "can be seen in the page" what page? in a worksheet?
morteza2006
02-03-2013, 08:47 AM
Yes Excel environment.
Simon Lloyd
02-03-2013, 03:42 PM
Im afraid you still havent been clear!
morteza2006
02-04-2013, 02:53 AM
Im afraid you still havent been clear!
Hi all
Dear friend, I am sorry that I speak perfect English
I open an Excel file from an Excel file and then I have written the following code into it
I open
application.windows.application.visible=false
All workbook is Hide
I just want the file to be coded Hide
morteza2006
02-06-2013, 05:16 AM
please help me please:dunno
morteza2006
02-07-2013, 12:45 PM
Please tell Excel to hide the master formulas
Aussiebear
02-07-2013, 03:50 PM
In an effort to clear up this thread, are you wanting:
(a) to hide a master workbook from users?, or
(b) to hide a worksheet containing formulas within a workbook?
morteza2006
02-07-2013, 11:25 PM
In an effort to clear up this thread, are you wanting:
(a) to hide a master workbook from users?, or
(b) to hide a worksheet containing formulas within a workbook?
Dear friend
Thank you very much
Opening form
In the picture below I Data - A workbook Hide and the Other workbooks is unhide
Sorry for not good English
If I am understanding correctly, you want to change this specific workbook's visibility. If that is correct, maybe try the workbook's IsAddin property.
Not well thought through, but as a start, something like:
In the Userform's module:
Option Explicit
Private Sub cmdUnload_Click()
Unload Me
End Sub
'vbFormControlMenu 0 The user has chosen the Close command from the Control menu on the UserForm.
'vbFormCode 1 The Unload statement is invoked from code.
'vbAppWindows 2 The current Windows operating environment session is ending.
'vbAppTaskManager 3 The Windows Task Manager is closing the application.
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Dim bWasSaved As Boolean
If CloseMode <= vbFormCode Then
bWasSaved = ThisWorkbook.Saved
ThisWorkbook.IsAddin = False
ThisWorkbook.Saved = bWasSaved
End If
End Sub
In the ThisWorkbook Module:
Option Explicit
Private Sub Workbook_Open()
ThisWorkbook.IsAddin = True
ThisWorkbook.Saved = True
frmMyForm.Show vbModal
End Sub
Hope that helps,
Mark
morteza2006
02-08-2013, 06:31 AM
If I am understanding correctly, you want to change this specific workbook's visibility. If that is correct, maybe try the workbook's IsAddin property.
Not well thought through, but as a start, something like:
In the Userform's module:
Option Explicit
Private Sub cmdUnload_Click()
Unload Me
End Sub
'vbFormControlMenu 0 The user has chosen the Close command from the Control menu on the UserForm.
'vbFormCode 1 The Unload statement is invoked from code.
'vbAppWindows 2 The current Windows operating environment session is ending.
'vbAppTaskManager 3 The Windows Task Manager is closing the application.
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Dim bWasSaved As Boolean
If CloseMode <= vbFormCode Then
bWasSaved = ThisWorkbook.Saved
ThisWorkbook.IsAddin = False
ThisWorkbook.Saved = bWasSaved
End If
End Sub
In the ThisWorkbook Module:
Option Explicit
Private Sub Workbook_Open()
ThisWorkbook.IsAddin = True
ThisWorkbook.Saved = True
frmMyForm.Show vbModal
End Sub
Hope that helps,
Mark
Oh My God
Yes
Your answer is correct
Thank you very, very much my teacher
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.