Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I use Workbook.Add

Hi, My routine creates a new workbook from a template
that contains links but I don't want to update the Links
yet.
So I use the line
Workbooks.Add templateStr
This works fine but every time it runs asks if I want to
update the Links.
Is it possible to amend the line so that it does not
update the Links and does not ask the question?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default How do I use Workbook.Add

Try....

Application.DisplayAlerts = False
Workbooks.Add templateStr
Application DisplayAlerts = True

"Neyboy18" wrote in message
...
Hi, My routine creates a new workbook from a template
that contains links but I don't want to update the Links
yet.
So I use the line
Workbooks.Add templateStr
This works fine but every time it runs asks if I want to
update the Links.
Is it possible to amend the line so that it does not
update the Links and does not ask the question?





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default How do I use Workbook.Add

Thanks, but because the default is to Update the links,
wont this do the same?

-----Original Message-----
Try....

Application.DisplayAlerts = False
Workbooks.Add templateStr
Application DisplayAlerts = True

"Neyboy18" wrote

in message
...
Hi, My routine creates a new workbook from a template
that contains links but I don't want to update the

Links
yet.
So I use the line
Workbooks.Add templateStr
This works fine but every time it runs asks if I want

to
update the Links.
Is it possible to amend the line so that it does not
update the Links and does not ask the question?





----== Posted via Newsfeed.Com - Unlimited-Uncensored-

Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the

World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total

Privacy via Encryption =---
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default How do I use Workbook.Add


"Newboy18" wrote in message
...
Thanks, but because the default is to Update the links,
wont this do the same?


Would this help you?

ActiveWorkbook.UpdateRemoteReferences = False

(Insert in code before opening template, then set back to true again
afterwards.)




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default How do I use Workbook.Add

Hi thanks for the ideas but it still asks to Update Links
and the default checkbox is still set to Update Links
This is what I have so far:

ActiveWorkbook.UpdateRemoteReferences = False
Application.DisplayAlerts = False
Workbooks.Add templateStr
Application.DisplayAlerts = True
ActiveWorkbook.UpdateRemoteReferences = True


-----Original Message-----

"Newboy18" wrote

in message
...
Thanks, but because the default is to Update the links,
wont this do the same?


Would this help you?

ActiveWorkbook.UpdateRemoteReferences = False

(Insert in code before opening template, then set back

to true again
afterwards.)




.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How do I use Workbook.Add

I don't believe there is a way to avoid this in xl2000 and earlier with a
setting. In xl2002 there is a setting to suppress this query (so you would
set it in the template - it is under the links option in the edit menu as I
recall - but if the workbook were opened in an earlier version, this would
not work).

UpdateRemoteReferences does not affect the question.

The way I would do this is open the template as a workbook, then saveas
using a new name so you don't overwrite your template. When you open the
template, set the updatelinks argument to 0

Workbooks.Open "C:\MyTemplate.xlt", UpdateLinks:=0
ActiveWorkbook.SaveAs "C:\MyTemplate1.xls", Fileformat:=xlWorkbookNormal

--
Regards,
tom Ogilvy




Newboy18 wrote in message
...
Hi thanks for the ideas but it still asks to Update Links
and the default checkbox is still set to Update Links
This is what I have so far:

ActiveWorkbook.UpdateRemoteReferences = False
Application.DisplayAlerts = False
Workbooks.Add templateStr
Application.DisplayAlerts = True
ActiveWorkbook.UpdateRemoteReferences = True


-----Original Message-----

"Newboy18" wrote

in message
...
Thanks, but because the default is to Update the links,
wont this do the same?


Would this help you?

ActiveWorkbook.UpdateRemoteReferences = False

(Insert in code before opening template, then set back

to true again
afterwards.)




.



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
Refresh pivot table in workbook A when changing a cell in workbook gildengorin Excel Worksheet Functions 2 March 17th 09 04:59 PM
Adding a chart to large workbook brings workbook activity to a hal Dale Excel Discussion (Misc queries) 6 December 29th 08 05:50 PM
Excel-how to link source workbook to copy of destination workbook D Lynn Excel Worksheet Functions 1 May 29th 08 05:36 PM
Select sheet tabs in workbook & save to separate workbook files stratocaster Excel Worksheet Functions 2 March 1st 06 03:35 PM
What commands do you use to name a workbook, save a workbook,open a workbook Steven R. Berke Excel Programming 1 July 24th 03 11:37 PM


All times are GMT +1. The time now is 01:28 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"