Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default exception at 0x6503999b (VBE6.DLL) - Please

I constantly get the following error when I get to
the ".InsertLines" of the code listed below the error.

Can anyone help
First-chance exception at 0x6503999b (VBE6.DLL) in
EXCEL.EXE: 0xC0000005: Access violation writing location
0x5c00800f.
Unhandled exception at 0x6503999b (VBE6.DLL) in EXCEL.EXE:
0xC0000005: Access violation writing location 0x5c00800f.

Sub Insert_Code()
Dim obvbc As VBIDE.VBComponent, lLine As Long
With Workbooks("Booked Sales by AS Rep Actuals.xls")
Set obvbc = .VBProject.VBComponents(.ActiveChart.CodeName)
End With
With obvbc.CodeModule
lLine = .CreateEventProc("Calculate", "chart")
.InsertLines lLine, "'Reset Custom Color Option"
.ReplaceLine lLine + 2, "ActiveChart.SeriesCollection
(1).Select" & vbCrLf & _
"If Selection.Interior.ColorIndex < 23 Then" &
vbCrLf & _
" With Selection.Border" & vbCrLf & _
" .ColorIndex = 5" & vbCrLf & _
" .Weight = xlThin" & vbCrLf & _
" .LineStyle = xlContinuous" & vbCrLf & _
" End With" & vbCrLf & _
"Selection.Shadow = False" & vbCrLf & _
"Selection.InvertIfNegative = False" & vbCrLf & _
" With Selection.Interior" & vbCrLf & _
" .ColorIndex = 23" & vbCrLf & _
" .Pattern = xlSolid" & vbCrLf & _
" End With" & vbCrLf & _
"End If"
End With
Set obvbc = Nothing
End Sub
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
Exception list Gene Straub Excel Discussion (Misc queries) 2 January 28th 09 10:46 PM
handle #VALUE exception Andis Cirulis Excel Worksheet Functions 2 November 13th 06 11:32 AM
Exception deleting cj21 Excel Discussion (Misc queries) 5 January 26th 06 04:05 PM
Getting an error message that reads "illegal operation....VBE6.DL. Liz Excel Discussion (Misc queries) 7 April 6th 05 01:34 AM
Excel Caused Error in VBE6.dll. Excel will Close mikeF New Users to Excel 0 March 3rd 05 02:01 PM


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

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

About Us

"It's about Microsoft Excel"