ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ActiveWorkbook.Names.Add -- Problem (https://www.excelbanter.com/excel-programming/383656-activeworkbook-names-add-problem.html)

Ger[_3_]

ActiveWorkbook.Names.Add -- Problem
 

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 ***

William Horton

ActiveWorkbook.Names.Add -- Problem
 
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 ***


JE McGimpsey

ActiveWorkbook.Names.Add -- Problem
 
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 ,
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 ***


Ger[_3_]

ActiveWorkbook.Names.Add -- Problem
 

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 ***

Ger[_3_]

ActiveWorkbook.Names.Add -- Problem
 
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 ***

JE McGimpsey

ActiveWorkbook.Names.Add -- Problem
 
One way:

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

In article , Ger
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 ***


Ger[_3_]

ActiveWorkbook.Names.Add -- Problem
 


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 ***


All times are GMT +1. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com