Copy range from one sheet to another

tmccar

New Member
Joined
Apr 7, 2016
Messages
22
When range "bg1" is copied from sheet "LB Rack" to the new sheet, It is pasted in column "BH". Why does it not paste into column "BG"?

Private Sub ComboBox1_Change()
Dim xlbook As Excel.Workbook
Dim j as Integer
Dim n as Variant
Dim xlapp As Excel.Application
Dim xlSheet As Excel.Worksheet
Set xlbook = GetObject("C:\07509\LB_RACKTMC.xlsx")
Set xlSheet = xlbook.Sheets("LB Rack")
Set xlapp = xlbook.Parent
xlapp.Visible = True


Set src = xlSheet.Range("bg1").CurrentRegion.SpecialCells(xlCellTypeVisible)
Set sh = xlbook.Sheets.Add
src.Copy sh.Range("bg1")


End Sub
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
At a guess I'd say there is something in column BF within the current region, even if it is a hidden row/column it still forms part of the current region.

To test I created a small range which selected just fine. I then moved the range along a little, again it selected just fine. I then put a value in a cell one column to the left and hid that row. The new current region (xlcelltypevisible) got selected including the column one to the left.
 
Upvote 0
At a guess I'd say there is something in column BF within the current region, even if it is a hidden row/column it still forms part of the current region.

To test I created a small range which selected just fine. I then moved the range along a little, again it selected just fine. I then put a value in a cell one column to the left and hid that row. The new current region (xlcelltypevisible) got selected including the column one to the left.


Yes, I think you're right. For some reason the range "BF" is being seen as 2 columns wide, but I don't see why.
 
Upvote 0
A merged cell perhaps?

Is there something in destination BF you don't want to paste on top of? If not you could just paste to BF, if there is you might want to look at offsetting your copy range.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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