Urgetnt Help !!!! error : Subscript out of range error

adr12345

Board Regular
Joined
Jan 19, 2015
Messages
67
Hi
I am working on huge data file.
I am applying just three filters and copy pasting that data into different workbook.

after filtering I have :

Range("A1").Select
Selection.CurrentRegion.Select
Selection.CopySet wkbOpen = Workbooks.Open(Filename:="path\Output.xlsb")
Worksheets("Sheet1").Select


and this is where I get the error Subscript out of range error
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
is this the line you are erroring on?

Code:
 Set wkbOpen = Workbooks.Open(Filename:="path\Output.xlsb")

are you tring to open a new workbook, paste the data in and save it?
 
Upvote 0
is this the line you are erroring on?

Code:
 Set wkbOpen = Workbooks.Open(Filename:="path\Output.xlsb")

are you tring to open a new workbook, paste the data in and save it?




And i got another error "pastecpecial method of range class failed"

:(



Actually I am getting error while pasting that data . Code for it is


ActiveCell.PasteSpecial xlPasteValues
 
Last edited:
Upvote 0
what are you looking to do? break it down
 
Upvote 0
I am modified the code and solving it step by stpe. everytime I am getting new errors....

Uptill applying filters, all works fine. after that i tried something like this..
Current code is ;

Range("A1").Cells.SpecialCells(xlCellTypeVisible).CopySet wkbOpen = Workbooks.Open(Filename:="path\Output.xlsb")
Workbooks("Output").Worksheets("Sheet1").Range("A1").Select
ActiveCell.PasteSpecial xlPasteAll


Now I am getting stuck at the line highlighted in bold. error is not enough system resources to display completely
 
Upvote 0
would taking out the active cell not work?

Code:
Workbooks("Output").Worksheets("Sheet1").Range("A1").PasteSpecial
 
Upvote 0

Forum statistics

Threads
1,214,626
Messages
6,120,602
Members
448,974
Latest member
ChristineC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top