P
polar
Hi Everybody,
I have an excel workbook with code that generates a separate workboo
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 Su
-------------------
Basically, for the Invoice Worksheet, when a button is clicked
separate workbook is generated with just the current invoice worksheet
Everything works fine but when I open the newly created file, I ge
prompted with this message:
"This workbook contains links to other data sources:
* If you update the links, Excel will attempt to retrieve the lates
data.
* If you don't update the links, Excel will use the previou
information."
Then at the bottom of the warning box there is 'update' and 'don'
update' and 'help'.
Is there anyway to eliminate this message coming up each time I creat
a new file? It's just something which is shared and to be honest I woul
be happy if the opened file was read only.
Any help would be greatly appreciated.
Thank you.
Kind regards,
Pola
I have an excel workbook with code that generates a separate workboo
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 Su
-------------------
Basically, for the Invoice Worksheet, when a button is clicked
separate workbook is generated with just the current invoice worksheet
Everything works fine but when I open the newly created file, I ge
prompted with this message:
"This workbook contains links to other data sources:
* If you update the links, Excel will attempt to retrieve the lates
data.
* If you don't update the links, Excel will use the previou
information."
Then at the bottom of the warning box there is 'update' and 'don'
update' and 'help'.
Is there anyway to eliminate this message coming up each time I creat
a new file? It's just something which is shared and to be honest I woul
be happy if the opened file was read only.
Any help would be greatly appreciated.
Thank you.
Kind regards,
Pola