View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
polar[_4_] polar[_4_] is offline
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