LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Warning Message on New Sheet Created


Hi Everybody,

I have an excel workbook with code that generates a separate workbook
with a unique file name.

This is my code to create a new workbook:


Code:
--------------------
With Sheets("Invoice2")
Dim invName As String
Sheets("Invoice2").Select
invName = Range("L4").Value & ".xls"
Sheets("Invoice2").Copy
ChDir "C:\Users\Justin\Documents\Razza Jam"

'Will ignore the error
On Error Resume Next
ActiveWorkbook.SaveAs Filename:=invName
On Error GoTo 0

'Will close without another alert message
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True
End With
End Sub
--------------------


Basically, for the Invoice Worksheet, when a button is clicked a
separate workbook is generated with just the current invoice worksheet.


Everything works fine but when I open the newly created file, I get
prompted with this message:

"This workbook contains links to other data sources:

* If you update the links, Excel will attempt to retrieve the latest
data.
* If you don't update the links, Excel will use the previous
information."

Then at the bottom of the warning box there is 'update' and 'don't
update' and 'help'.

Is there anyway to eliminate this message coming up each time I create
a new file? It's just something which is shared and to be honest I would
be happy if the opened file was read only.

Any help would be greatly appreciated.

Thank you.

Kind regards,

Polar


--
polar
------------------------------------------------------------------------
polar's Profile: http://www.thecodecage.com/forumz/member.php?userid=564
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=120950

 
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
MS EXCEL - To supress warning messages created by Anlysis ToolPak Niyaz Rasheed Excel Programming 1 December 4th 07 12:58 PM
How can I make Excel give me a warning message? Ray[_4_] Excel Programming 3 August 8th 07 03:48 PM
Warning Message in Excel Agustin Calderon Excel Discussion (Misc queries) 1 August 30th 05 03:03 AM
What is the VBA code to delete a sheet without warning message? [email protected] Excel Discussion (Misc queries) 2 August 9th 05 04:16 PM
If sheet not created show a message BeSmart Excel Programming 3 April 19th 05 01:17 AM


All times are GMT +1. The time now is 01:40 AM.

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

About Us

"It's about Microsoft Excel"