Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 385
Default What's wrong with this picture

Ok this doesn't work unless the producedata is active. WHY? Just when I
thought I was getting this!
Sub UpdateInvoiceList()
With Worksheets("ProduceData")
..Range("Invoice").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _
"q2"), Unique:=True
..Range("InvoiceList").Sort Key1:=Sheets("ProduceData").Range("q3")
End With

End Sub
--
Though daily learning, I LOVE EXCEL!
Jennifer
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default What's wrong with this picture

"Jennifer" wrote in message
...
Ok this doesn't work unless the producedata is active. WHY? Just when I
thought I was getting this!
Sub UpdateInvoiceList()
With Worksheets("ProduceData")
.Range("Invoice").AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range( _
"q2"), Unique:=True
.Range("InvoiceList").Sort Key1:=Sheets("ProduceData").Range("q3")
End With

End Sub


Hi Jennifer,

You have an unqualified Range method call in the CopyToRange argument of
the AdvancedFilter method. If Range("q2") refers to a cell located on the
ProduceData worksheet, simply placing a dot in front of Range("q2") will
solve the problem.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm


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
Connect a number to a picture bank and import that picture to exce Dennis Hedo Excel Discussion (Misc queries) 1 March 22nd 10 02:17 PM
Insert Calculated Field (wrong Qty*Price = wrong Amount) Edmund Excel Discussion (Misc queries) 8 October 4th 07 12:13 PM
how do I insert picture into cell so vlookup can return picture? ah Excel Worksheet Functions 1 May 1st 07 04:38 AM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
What's wrong with this picture? VBA Date code.. mriley Excel Programming 2 October 17th 03 05:56 PM


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