Im having problmes with copy paste in excel when using vba code in access. Either new rows dont contain the correct formulas or a application/object error is given. Any ideas please....
I have an access application that has been converted to 2003, it generates a report by inserting one record at a time into excel. A second piece of code then inserts a new row in the excel and copies the row to the new row so the data scrolls down the screen.
The rows contain formulas and values. Ive tried the following code but all seem to have their own problems
This will copy values including turning formulars to values
XLXWorksheet.Rows(lRow + iOffset).PasteSpecial Paste:=xlValues
This will copy cell contents (valus as values, formulars as formulas with relational as relational and absolute as absolute or any mixture).
XLXWorksheet.Rows(lRow + iOffset).PasteSpecial Paste:=xlFormulas
With regards to the last Item, without knowing the range of address involved, I can only comment that you only need to specifythe anchor address for the destination. ie
I don't know if that helps ?
Excel is quite flexible and you can use this syntax or that suggested by norie
Without resorting to R1C1 notation and copying cells individually I do not know if you can COPY a relation formular and retain it's absolute address, if that is what you are trying to do ?