N35t0r
10-21-2008, 07:42 AM
Hello,
In a Macro I've made, I need to copy a heading from another workbook. I'm using the following code:
Workbooks("Workbook").ActiveSheet.Cells(1, 1).Copy
Cells(1, 1).Select
.Paste
I'm sure the workbook is open.
My problem is that, if cell A1 is merged with another, then nothing is copied. I could forcibly de-merge all headings, or merge them and copy both cells, but I'm sure there must be a.. less invasive method of doing it.
Any ideas?
Thanks!
In a Macro I've made, I need to copy a heading from another workbook. I'm using the following code:
Workbooks("Workbook").ActiveSheet.Cells(1, 1).Copy
Cells(1, 1).Select
.Paste
I'm sure the workbook is open.
My problem is that, if cell A1 is merged with another, then nothing is copied. I could forcibly de-merge all headings, or merge them and copy both cells, but I'm sure there must be a.. less invasive method of doing it.
Any ideas?
Thanks!