Thread: VBA problem.
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default VBA problem.

If desired, send your file ( S ) to my address below. I will only
look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.


Don Guillett
Microsoft MVP Excel
SalesAid Software

"Dani Lima" wrote in message
...
Hey.. I need some help..

I have to filter the values of one collumm according to the value on
another
cell on another workbook, than I have to copy and past it in a third
workbook.

I am trying this code.. but I doesnt work, It did not recognize the value
on
the cell...

help meeee!!!

The code:

Windows("Prazos de entrega_matriz").Activate 'it's the first workbook.
Sheets("Extract BD").Select
Windows("" & Sheets("Extract BD").Range("R7") & ".xls").Activate 'it
activate the second workbook. The one who has the parameter to filter the
values
Range("E3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.AutoFilter Field:=2, Criteria1:='[Prazos de
entrega_matriz.xls]Extract BD'!$L$7 'that's the address of the cell with
the
name of the value to be filtered in the second workbook.
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Windows("" & Sheets("Extract BD").Range("O7") & ".xls").Activate 'it
activate the third workbook.
Range("B2").Select
ActiveSheet.Paste