Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default break link problem

When I run the following code... it crashes my excel and I believe it is
because of the break links command.

any ideas?

Application.Run "'SNW INV PLAIN.xls'!FilterAll"
Sheets("Agencies").Select
Range("a1").Select
Sheets("Corporates").Select
Range("a1").Select
Sheets("Tax Muni's").Select
Range("a1").Select
Sheets("Muni's").Select
Range("a1").Select
Sheets("Agencies").Select
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Select
Sheets("Agencies").Activate
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Copy
ActiveWorkbook.BreakLink Name:="S:\Inventory\SNW INV PLAIN.xls", Type:= _
xlExcelLinks
Application.Wait Now + TimeSerial(0, 0, 1)
Sheets("Agencies").Select
ActiveWorkbook.Protect Password:="snwwb", Structu=True, Windows:=False
sFilename = "S:\Inventory\SNW Offerings " & Format(Now, "yyyy-mm-dd")
ans = MsgBox("Save file as " & sFilename)
If ans = vbOK Then
ActiveWorkbook.SaveAs Filename:=sFilename
End If
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default break link problem

Hi John,

What is the version of Excel?

I believe that BreakLink was introduced with xl2002.


---
Regards,
Norman



"John" wrote in message
...
When I run the following code... it crashes my excel and I believe it is
because of the break links command.

any ideas?

Application.Run "'SNW INV PLAIN.xls'!FilterAll"
Sheets("Agencies").Select
Range("a1").Select
Sheets("Corporates").Select
Range("a1").Select
Sheets("Tax Muni's").Select
Range("a1").Select
Sheets("Muni's").Select
Range("a1").Select
Sheets("Agencies").Select
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Select
Sheets("Agencies").Activate
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Copy
ActiveWorkbook.BreakLink Name:="S:\Inventory\SNW INV PLAIN.xls", Type:=
_
xlExcelLinks
Application.Wait Now + TimeSerial(0, 0, 1)
Sheets("Agencies").Select
ActiveWorkbook.Protect Password:="snwwb", Structu=True,
Windows:=False
sFilename = "S:\Inventory\SNW Offerings " & Format(Now, "yyyy-mm-dd")
ans = MsgBox("Save file as " & sFilename)
If ans = vbOK Then
ActiveWorkbook.SaveAs Filename:=sFilename
End If



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 268
Default break link problem

Hi John

Try to use

Application.Wait (Now() + TimeValue("00:00:01"))

TimeSerial is used to return a date variable (Integer). Syntax is MyTime =
TimeSerial(15, 29, 45)

"John" wrote:

When I run the following code... it crashes my excel and I believe it is
because of the break links command.

any ideas?

Application.Run "'SNW INV PLAIN.xls'!FilterAll"
Sheets("Agencies").Select
Range("a1").Select
Sheets("Corporates").Select
Range("a1").Select
Sheets("Tax Muni's").Select
Range("a1").Select
Sheets("Muni's").Select
Range("a1").Select
Sheets("Agencies").Select
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Select
Sheets("Agencies").Activate
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Copy
ActiveWorkbook.BreakLink Name:="S:\Inventory\SNW INV PLAIN.xls", Type:= _
xlExcelLinks
Application.Wait Now + TimeSerial(0, 0, 1)
Sheets("Agencies").Select
ActiveWorkbook.Protect Password:="snwwb", Structu=True, Windows:=False
sFilename = "S:\Inventory\SNW Offerings " & Format(Now, "yyyy-mm-dd")
ans = MsgBox("Save file as " & sFilename)
If ans = vbOK Then
ActiveWorkbook.SaveAs Filename:=sFilename
End If

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default break link problem

well I have excel 2003, and with that time value change it ran correctly 3
times and crashed the fourth... which is better than before... which seemed
to crash every other time, but this is strange.


"Kassie" wrote:

Hi John

Try to use

Application.Wait (Now() + TimeValue("00:00:01"))

TimeSerial is used to return a date variable (Integer). Syntax is MyTime =
TimeSerial(15, 29, 45)

"John" wrote:

When I run the following code... it crashes my excel and I believe it is
because of the break links command.

any ideas?

Application.Run "'SNW INV PLAIN.xls'!FilterAll"
Sheets("Agencies").Select
Range("a1").Select
Sheets("Corporates").Select
Range("a1").Select
Sheets("Tax Muni's").Select
Range("a1").Select
Sheets("Muni's").Select
Range("a1").Select
Sheets("Agencies").Select
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Select
Sheets("Agencies").Activate
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Copy
ActiveWorkbook.BreakLink Name:="S:\Inventory\SNW INV PLAIN.xls", Type:= _
xlExcelLinks
Application.Wait Now + TimeSerial(0, 0, 1)
Sheets("Agencies").Select
ActiveWorkbook.Protect Password:="snwwb", Structu=True, Windows:=False
sFilename = "S:\Inventory\SNW Offerings " & Format(Now, "yyyy-mm-dd")
ans = MsgBox("Save file as " & sFilename)
If ans = vbOK Then
ActiveWorkbook.SaveAs Filename:=sFilename
End If

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default break link problem

I can't get it to crash again... thats good right? :)

well, I guess it is ok...


"Kassie" wrote:

Hi John

Try to use

Application.Wait (Now() + TimeValue("00:00:01"))

TimeSerial is used to return a date variable (Integer). Syntax is MyTime =
TimeSerial(15, 29, 45)

"John" wrote:

When I run the following code... it crashes my excel and I believe it is
because of the break links command.

any ideas?

Application.Run "'SNW INV PLAIN.xls'!FilterAll"
Sheets("Agencies").Select
Range("a1").Select
Sheets("Corporates").Select
Range("a1").Select
Sheets("Tax Muni's").Select
Range("a1").Select
Sheets("Muni's").Select
Range("a1").Select
Sheets("Agencies").Select
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Select
Sheets("Agencies").Activate
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Copy
ActiveWorkbook.BreakLink Name:="S:\Inventory\SNW INV PLAIN.xls", Type:= _
xlExcelLinks
Application.Wait Now + TimeSerial(0, 0, 1)
Sheets("Agencies").Select
ActiveWorkbook.Protect Password:="snwwb", Structu=True, Windows:=False
sFilename = "S:\Inventory\SNW Offerings " & Format(Now, "yyyy-mm-dd")
ans = MsgBox("Save file as " & sFilename)
If ans = vbOK Then
ActiveWorkbook.SaveAs Filename:=sFilename
End If



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 268
Default break link problem

I do not know why it crashed John, but hopefully your problem is now solved?

"John" wrote:

I can't get it to crash again... thats good right? :)

well, I guess it is ok...


"Kassie" wrote:

Hi John

Try to use

Application.Wait (Now() + TimeValue("00:00:01"))

TimeSerial is used to return a date variable (Integer). Syntax is MyTime =
TimeSerial(15, 29, 45)

"John" wrote:

When I run the following code... it crashes my excel and I believe it is
because of the break links command.

any ideas?

Application.Run "'SNW INV PLAIN.xls'!FilterAll"
Sheets("Agencies").Select
Range("a1").Select
Sheets("Corporates").Select
Range("a1").Select
Sheets("Tax Muni's").Select
Range("a1").Select
Sheets("Muni's").Select
Range("a1").Select
Sheets("Agencies").Select
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Select
Sheets("Agencies").Activate
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Copy
ActiveWorkbook.BreakLink Name:="S:\Inventory\SNW INV PLAIN.xls", Type:= _
xlExcelLinks
Application.Wait Now + TimeSerial(0, 0, 1)
Sheets("Agencies").Select
ActiveWorkbook.Protect Password:="snwwb", Structu=True, Windows:=False
sFilename = "S:\Inventory\SNW Offerings " & Format(Now, "yyyy-mm-dd")
ans = MsgBox("Save file as " & sFilename)
If ans = vbOK Then
ActiveWorkbook.SaveAs Filename:=sFilename
End If

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
Break a link between workbooks when there is no "break" option FruitNLoops Excel Discussion (Misc queries) 2 January 31st 09 05:16 AM
Link won't break dannyfreedom Excel Discussion (Misc queries) 1 July 28th 08 05:24 PM
Can Not Break a Link albertmb Excel Discussion (Misc queries) 3 June 20th 08 02:22 PM
Can't break my link thelees Excel Discussion (Misc queries) 0 February 4th 07 10:32 PM
break a link refresh Charts and Charting in Excel 3 December 17th 04 06:23 PM


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