LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 277
Default Error 400 in VB code execution?


What the heck. It did not do this before.

Now, whenever I run this code, this error pops up, then I click OK (the
only option), and then the data fills in correctly. It did not do this
before.

I have the actor index data and actor data on two other sheets, as well
as table1 and table 2, and table 4 is on the Master_Pane sheet (sheet1),
from which I do a simple vlookup to get the actor names to pop in based
on the id numbers that fill table 4 in.

Here is a screen shot as well...

http://i255.photobucket.com/albums/h...creenShot1.png

and the code (pops in the actor ID numbers into table 4):


Sub FilterOnVar()
Dim rngData As Range
Dim rngCriteria As Range
Dim rngExtract As Range
Dim s As String

Application.ScreenUpdating = False
With Sheets("Acted_In")
Set rngData = .Range("Table1[#All]")
Set rngCriteria = .Range("Table3[#All]")
End With
With Sheets("Master_Pane")
Set rngExtract = .Range("Table4[#Headers]")

rngData.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=rngCriteria, _
CopyToRange:=rngExtract

With .ListObjects("Table4")
If .ListColumns(1).DataBodyRange.Cells(1) < "" Then
.Resize .HeaderRowRange.CurrentRegion
End If
End With
End With
End Sub



The error appears on the 5th line up from the bottom:

".Resize .HeaderRowRange.CurrentRegion" line.
 
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
Code execution error Tom Excel Programming 6 October 21st 08 09:00 PM
VBA "Code execution interrupted" error on End Sub and End IF c0mmands?? Allan P. London, CPA Excel Programming 0 May 13th 08 09:01 PM
Code Execution Error Craig Excel Programming 1 August 29th 06 09:28 AM
Macro 'Code execution has been interupted' error after print? Bluehair the Pirate Excel Programming 1 February 9th 06 06:19 PM
error: Code Execution has been interrupted Joshua Fredrickson Excel Programming 1 November 23rd 05 03:44 PM


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