PC Review


Reply
Thread Tools Rate Thread

ActiveWorkbook.Names.Add -- Problem

 
 
Ger
Guest
Posts: n/a
 
      21st Feb 2007

Hi
I use the ActiveWorkbook.Names.Add to memorize the variable value (not
visible to the user) in the excel active workbook

Ex. ActiveWorkbook.Names.Add "Name", VarName, False

but with the Excel 2000 and logon to the pc with a low level user, this
property cause a popup message
"Do you want to save the changes you made to "workbook" name"? even if I
have not made any changes to the file.
Is it possible in this case to disappear this popup?

Thanks in advanced

Ger

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
=?Utf-8?B?V2lsbGlhbSBIb3J0b24=?=
Guest
Posts: n/a
 
      21st Feb 2007
Perhaps setting the saved property to True right after you add the name
(which is triggering the save prompt) you won't get the save prompt anymore
(unless something else is changed in the workbook after the property has been
set).

"Ger" wrote:

>
> Hi
> I use the ActiveWorkbook.Names.Add to memorize the variable value (not
> visible to the user) in the excel active workbook
>
> Ex. ActiveWorkbook.Names.Add "Name", VarName, False
>
> but with the Excel 2000 and logon to the pc with a low level user, this
> property cause a popup message
> "Do you want to save the changes you made to "workbook" name"? even if I
> have not made any changes to the file.
> Is it possible in this case to disappear this popup?
>
> Thanks in advanced
>
> Ger
>
> *** Sent via Developersdex http://www.developersdex.com ***
>

 
Reply With Quote
 
JE McGimpsey
Guest
Posts: n/a
 
      21st Feb 2007
Well, you *are* making a change to the file by adding a Name.

If you don't want to save the Name, you can add the line

ActiveWorkbook.Saved = True

immediately after you add the name.


In article <(E-Mail Removed)>,
Ger <(E-Mail Removed)> wrote:

> Hi
> I use the ActiveWorkbook.Names.Add to memorize the variable value (not
> visible to the user) in the excel active workbook
>
> Ex. ActiveWorkbook.Names.Add "Name", VarName, False
>
> but with the Excel 2000 and logon to the pc with a low level user, this
> property cause a popup message
> "Do you want to save the changes you made to "workbook" name"? even if I
> have not made any changes to the file.
> Is it possible in this case to disappear this popup?
>
> Thanks in advanced
>
> Ger
>
> *** Sent via Developersdex http://www.developersdex.com ***

 
Reply With Quote
 
Ger
Guest
Posts: n/a
 
      22nd Feb 2007

Thanks!!
My doubt was that if you set this "saved" property at true,
then If you made other changes in the workbook, the popup message wasn't
visualized anymore.
But this property get set if you made the changes again.

Thanks again
Bye

Ger


*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Ger
Guest
Posts: n/a
 
      22nd Feb 2007
Sorry!..Another problem.. But If I made the changes in my workbook and
then I use this saved property (after the ActiveWorkbook.Names.Add...),
when the workbook is closed, it isn't saved.
How can I capture the event on the workbook changes and in this case
visualize the popup and save it?

Thank

Ger



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
JE McGimpsey
Guest
Posts: n/a
 
      22nd Feb 2007
One way:

With ActiveWorkbook
bOldSaved = .Saved
.Names.Add Name:="MyName", RefersTo:="MyNameReference"
.Saved = bOldSaved
End With

In article <#(E-Mail Removed)>, Ger <(E-Mail Removed)>
wrote:

> Sorry!..Another problem.. But If I made the changes in my workbook and
> then I use this saved property (after the ActiveWorkbook.Names.Add...),
> when the workbook is closed, it isn't saved.
> How can I capture the event on the workbook changes and in this case
> visualize the popup and save it?
>
> Thank
>
> Ger
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***

 
Reply With Quote
 
Ger
Guest
Posts: n/a
 
      23rd Feb 2007


Thanks JE!! Thank you very much!!!
Thanks William too!!

Now I solved my problem :-)

Thanks and thanks again

Ger

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveWorkbook.Names.Add Name ??? Luc Microsoft Excel Programming 4 16th Jan 2010 02:26 PM
Get Names of ActiveWorkbook.CustomViews cellist Microsoft Excel Programming 2 30th Apr 2008 07:02 AM
Mutiple names in ActiveWorkbook.SendMail Recipients:= =?Utf-8?B?ZGFsZWF0c2hlbA==?= Microsoft Excel Misc 2 5th Feb 2007 08:06 PM
'ActiveWorkbook.Names.Add Name:' how to make range variable? =?Utf-8?B?VGVlU2Vh?= Microsoft Excel Programming 1 9th Jun 2005 03:42 PM
Using ActiveWorkbook.Names.Add Name:= Stuart Microsoft Excel Programming 2 15th Nov 2003 02:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:07 PM.