Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Puzzling attribute - trying again

Hi all,
Does anyone know why the command
ActiveWindow.DisplayWorkbookTabs = True or
ActiveWindow.DisplayWorkbookTabs = False

anywhere in an activeworkbook kicks off the prompt to save a hidden (and
untouched) Personal.xlsb when Excel is closed?

Kind regards,
Bony
--
"There are 10 types of people in this world. Those who understand Binary
and those who don''t ..."

--
"There are 10 types of people in this world. Those who understand Binary
and those who don''t ..."
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Puzzling attribute - trying again

Normally that should not changed the Saved property (unless of course your
Personal is visible and active). Maybe the following will shed some light

Sub Test()
dim wb as Workbook
Set wb = Workbooks("personal.xlsb")
If wb.Saved = False Then
Debug.Print "hmm! reset Saved"
wb.Saved = True
End If
With ActiveWindow
.DisplayWorkbookTabs = Not .DisplayWorkbookTabs
End With
Debug.Print wb.Saved ' ?
Debug.Print ActiveWindow.Parent.Name ' ?
End Sub

Regards,
Peter T

"Bony Pony" wrote in message
...
Hi all,
Does anyone know why the command
ActiveWindow.DisplayWorkbookTabs = True or
ActiveWindow.DisplayWorkbookTabs = False

anywhere in an activeworkbook kicks off the prompt to save a hidden (and
untouched) Personal.xlsb when Excel is closed?

Kind regards,
Bony
--
"There are 10 types of people in this world. Those who understand Binary
and those who don''t ..."

--
"There are 10 types of people in this world. Those who understand Binary
and those who don''t ..."



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Puzzling attribute - trying again

Hi Peter,
many thanks for the reply.

Actually, I had a module similar to what you kindly posted. That's how I
spotted the problem in the first place. Even running through your code it
causes the issue. You need to run the module twice and on the second time,
you will see the wb.saved changes to false ...

My personal.xlsb is hidden, inactive and the vba project locked. The
activewindow.parent.name comes back with the correct activesheet as well.
Very strange!!

Thanks again!

Kind regards, Bony
--
"There are 10 types of people in this world. Those who understand Binary
and those who don''t ..."


"Peter T" wrote:

Normally that should not changed the Saved property (unless of course your
Personal is visible and active). Maybe the following will shed some light

Sub Test()
dim wb as Workbook
Set wb = Workbooks("personal.xlsb")
If wb.Saved = False Then
Debug.Print "hmm! reset Saved"
wb.Saved = True
End If
With ActiveWindow
.DisplayWorkbookTabs = Not .DisplayWorkbookTabs
End With
Debug.Print wb.Saved ' ?
Debug.Print ActiveWindow.Parent.Name ' ?
End Sub

Regards,
Peter T

"Bony Pony" wrote in message
...
Hi all,
Does anyone know why the command
ActiveWindow.DisplayWorkbookTabs = True or
ActiveWindow.DisplayWorkbookTabs = False

anywhere in an activeworkbook kicks off the prompt to save a hidden (and
untouched) Personal.xlsb when Excel is closed?

Kind regards,
Bony
--
"There are 10 types of people in this world. Those who understand Binary
and those who don''t ..."

--
"There are 10 types of people in this world. Those who understand Binary
and those who don''t ..."



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Puzzling attribute - trying again

Try as described below

- start a new session of Excel
- add a new module to the Book1 project
- paste the Test macro I posted last time into the new module
- run the macro twice. press F5 with the cursor in the macro

This is what I got in the Immediate window
Book1
True
Book1
True

What do you get ?

Regards,
Peter T


"Bony Pony" wrote in message
...
Hi Peter,
many thanks for the reply.

Actually, I had a module similar to what you kindly posted. That's how I
spotted the problem in the first place. Even running through your code it
causes the issue. You need to run the module twice and on the second
time,
you will see the wb.saved changes to false ...

My personal.xlsb is hidden, inactive and the vba project locked. The
activewindow.parent.name comes back with the correct activesheet as well.
Very strange!!

Thanks again!

Kind regards, Bony
--
"There are 10 types of people in this world. Those who understand Binary
and those who don''t ..."


"Peter T" wrote:

Normally that should not changed the Saved property (unless of course
your
Personal is visible and active). Maybe the following will shed some light

Sub Test()
dim wb as Workbook
Set wb = Workbooks("personal.xlsb")
If wb.Saved = False Then
Debug.Print "hmm! reset Saved"
wb.Saved = True
End If
With ActiveWindow
.DisplayWorkbookTabs = Not .DisplayWorkbookTabs
End With
Debug.Print wb.Saved ' ?
Debug.Print ActiveWindow.Parent.Name ' ?
End Sub

Regards,
Peter T

"Bony Pony" wrote in message
...
Hi all,
Does anyone know why the command
ActiveWindow.DisplayWorkbookTabs = True or
ActiveWindow.DisplayWorkbookTabs = False

anywhere in an activeworkbook kicks off the prompt to save a hidden
(and
untouched) Personal.xlsb when Excel is closed?

Kind regards,
Bony
--
"There are 10 types of people in this world. Those who understand
Binary
and those who don''t ..."

--
"There are 10 types of people in this world. Those who understand
Binary
and those who don''t ..."



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Puzzling attribute Bony Pony[_3_] Excel Discussion (Misc queries) 0 February 22nd 10 05:09 PM
A puzzling duplicate data issue... thoerter Excel Programming 2 April 24th 08 06:29 PM
Sum help this is puzzling??????????? scott Excel Worksheet Functions 9 March 1st 06 06:49 PM
Puzzling Format Questions Kevin H. Stecyk Excel Discussion (Misc queries) 3 May 17th 05 11:44 AM
Puzzling Memory Error ! Donna[_7_] Excel Programming 1 April 6th 05 03:05 AM


All times are GMT +1. The time now is 03:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"