LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 109
Default Runtime Error '-2147417848 (80010108)'

Can anyone help me ... I keep getting the following message

Runtime Error '-2147417848 (80010108)'
Automation Error
The object invoked has disconnected from its clients

The macro in question is listed below and is used to create and name
multiple worksheets by copying a template worksheet called 'TowerMaster'
based on a variable input list. This used to work perfectly until
yesterday... now it crashes after looping through the first time and creates
a copy of 'TowerMaster' called 'TowerMaster (2)' and then stops ?

The VBA code is listd below :

Option Explicit
Sub InitialTowerCreation()

Dim TowerName As Range
Dim NewTowerName As String
Dim iResponse As Integer

iResponse = MsgBox("This Macro should only be used once to create Tower
Worksheets from initial Tower List. Do you wish to Continue ?", vbYesNo)
'display statement to execute if ok
If iResponse = vbNo Then
MsgBox "You selected No"
Exit Sub
End If

If iResponse = vbYes Then
MsgBox "You selected Yes"
End If

Sheets("TowerMaster").Visible = True

For Each TowerName In PickLists.[List_Towers]
If TowerName < "???" Then

NewTowerName = TowerName

Sheets("TowerMaster").Select
Application.CutCopyMode = False
Sheets("TowerMaster").Copy befo=Sheets("TowerMaster")
Sheets("TowerMaster (2)").Select
Sheets("TowerMaster (2)").Name = TowerName

Range("A6:A7").Select
ActiveCell.FormulaR1C1 = TowerName

ActiveWorkbook.Names.Add Name:="Data1_" & TowerName,
RefersToR1C1:= _
"=R11C1:R15C59"
ActiveWorkbook.Names.Add Name:="Data2_" & TowerName,
RefersToR1C1:= _
"=R27C1:R31C59"
ActiveWorkbook.Names.Add Name:="Data3_" & TowerName,
RefersToR1C1:= _
"=R43C1:R47C59"

'create Job Level Validation Range on sheet Job Levels
Sheets("Job Levels").Select
Rows("98:105").Select
Range("B98").Activate
Selection.Insert Shift:=xlDown

Range("Lev_MasterRng").Select
Selection.Copy


Rows("98:98").Select
ActiveSheet.Paste
Range("C98:C105").Select
Application.CutCopyMode = False
ActiveWorkbook.Names.Add Name:="Lev_" & TowerName,
RefersToR1C1:= _
"='Job Levels'!R98C3:R105C3"
Range("a98").Select
ActiveCell.FormulaR1C1 = TowerName

'create Job Level validation on Towersheet
Sheets("TowerMaster").Select
Calculate
Calculate
Sheets(NewTowerName).Select
Range("F11:F14,F16").Select
Range("F16").Activate
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,
Operator:= _
xlBetween, Formula1:="=Lev_" & TowerName
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With


Else
'do nothing
End If


On Error Resume Next

Next TowerName

Sheets("TowerMaster").Select
ActiveWindow.SelectedSheets.Visible = False
Calculate
Sheets("PickLists").Select

RefreshRates

End Sub


This used to work perfectly until yesterday... now it crashes after creating
the first new worksheet from the list ??


--
Regards & Thanks
 
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
Runtime Error -2147417848 (80010108) [email protected] Excel Programming 1 July 7th 06 07:00 PM
Active x Calendar control error (-2147417848 (80010108)) JimPNicholls Excel Programming 0 August 16th 04 11:49 AM
Excel Bug: Run-time error '-2147417848 (80010108)' majikman[_18_] Excel Programming 1 May 13th 04 08:16 PM
Automation error -2147417848 (80010108) mbobro[_5_] Excel Programming 2 April 8th 04 01:10 PM
Run time error 2147417848(80010108) Praveen Excel Programming 4 December 18th 03 10:23 AM


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