Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Run-time error 438 - using With

I'm trying to find out why this code is not working.

With Worksheets("Multi-period Code data").ListBox1
.Clear
For FillCount = 1 To Worksheets("ClassCodes").Range("E1")
.AddItem
Worksheets("ClassCodes").Range("C1").Offset(FillCo unt, 0)
Next FillCount
.ListIndex = Worksheets("Multi-period Code data").Range("O1").Value
End With

Just to clarify, there is a sheet named "Multi-period Code data" and
ListBox1 exists on the sheet. The error appears to be at the initial "With"
statement. I've tried changing it by moving the ".ListBox1" off the first
line and placing it appropriately within the code, but I keep getting
run-time error 438 as soon as it sees the "With" statement.

How can I make this work?
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
run time error 1004 general odbc error excel 2003 vba Mentos Excel Programming 5 January 24th 11 02:56 PM
Error handling error # 1004 Run-time error [email protected] Excel Programming 3 May 20th 08 02:23 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) Tim[_36_] Excel Programming 4 April 23rd 04 02:53 AM


All times are GMT +1. The time now is 09:26 PM.

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"