Martin1991
New Member
- Joined
- Nov 14, 2017
- Messages
- 24
Hello.
I am using simple macro to copy some Values onto another sheets of another workbooks. But before paste of Values i need to delete remaining Values in COPYpath workbook.
And here came the problem, because i need to vba not to clear values including format of page. In workbook, where i copy to, is format, where the "A column" has original format, but columns "B-E" have greater Width.
But after deleting of original data, the vba format mentioned Columns to same Width as is in "A Column"
adding only the part of copy, paste code.
There is problem with paste part aswell,(438-object doesnt support this property of method). I tried more ways, how to declare the Range i needed; Same bug with codes:
Does it needs some kind of pasteSpecial since i copy only visible cells?
Please help to advise, how to fix it.
I am using simple macro to copy some Values onto another sheets of another workbooks. But before paste of Values i need to delete remaining Values in COPYpath workbook.
And here came the problem, because i need to vba not to clear values including format of page. In workbook, where i copy to, is format, where the "A column" has original format, but columns "B-E" have greater Width.
But after deleting of original data, the vba format mentioned Columns to same Width as is in "A Column"
adding only the part of copy, paste code.
Code:
Db.Activate ´Db is just defined WorkBookRange("A1:E1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete
wb.Activate
obl2.Columns(3).SpecialCells(xlCellTypeVisible).Copy
Db.Activate
Db.Worksheets("Sheet1").Range("B1").Paste
There is problem with paste part aswell,(438-object doesnt support this property of method). I tried more ways, how to declare the Range i needed; Same bug with codes:
Code:
Worksheets("Sheet1").Range("B1").Paste
Code:
Worksheets("Sheet1").Range("B1").Select
Selection.Paste
Does it needs some kind of pasteSpecial since i copy only visible cells?
Please help to advise, how to fix it.