DevastatioN
Registered User.
- Local time
- Today, 04:41
- Joined
- Nov 21, 2007
- Messages
- 242
Hello,
I have a database which has a VBA procedure that takes lots of data from the tables, opens Excel up in the background, uses a template to paste in the data into the correct places on the Excel sheet.
Unfortunately, because of one to many relationships, rows have to be added in certain places because of varying data. I can add a new row in Excel from my Access VBA procedure, but the problem is it won't be formatted correctly.
I can't seem to find a way to copy a row and paste a row in Excel from Access VBA. Or even a way to format the cells using Access VBA.
Currently I'm stuck to putting 50 formatted rows in the Excel file, counting how many I use and delete the rest (if I use 7, my Access VBA procedure deleted 43 rows and then continues).
Is there anyway to for Access VBA to be able to use ALL Excel VBA stuff? I know inside of Excel this is easily possible with things like .copy and SelectionCopy.Paste, however VBA from Access doesn't recognize this. Even if Access VBA can make borders and backcolor changes etc. that'd work, but easiest is clearly just copy row + formatting and then paste copy.
Any help would be appreciated thanks.
I have a database which has a VBA procedure that takes lots of data from the tables, opens Excel up in the background, uses a template to paste in the data into the correct places on the Excel sheet.
Unfortunately, because of one to many relationships, rows have to be added in certain places because of varying data. I can add a new row in Excel from my Access VBA procedure, but the problem is it won't be formatted correctly.
I can't seem to find a way to copy a row and paste a row in Excel from Access VBA. Or even a way to format the cells using Access VBA.
Currently I'm stuck to putting 50 formatted rows in the Excel file, counting how many I use and delete the rest (if I use 7, my Access VBA procedure deleted 43 rows and then continues).
Is there anyway to for Access VBA to be able to use ALL Excel VBA stuff? I know inside of Excel this is easily possible with things like .copy and SelectionCopy.Paste, however VBA from Access doesn't recognize this. Even if Access VBA can make borders and backcolor changes etc. that'd work, but easiest is clearly just copy row + formatting and then paste copy.
Any help would be appreciated thanks.