var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Excel automation failed
What I wanted to do is to copy the value of cell E21 of worksheet “Op Pg 3” automatically to cell D8 ( or Cell (8,4) ) on worksheet “Op Pg 1”
During Excel automation from MS Access, I got an popup window “Update Values:3” . When I cancelled the window, the cell D8 on worksheet “Op Pg 1” has an error message “#Name?”
Here is some of the codes:
Dim xlApp As New Excel.Application
Dim xlWS As Excel.Worksheet
‘ here cells of 2 and more worksheets are being formatted and populated with values
xlApp.Sheets("Op Pg 1").Select
xlApp.Cells(8, 4).Formula = "= Op Pg 3!E21" <---- error here
Some experts please help. Thank you
This issue happens whern you use spacves in page names. I would recommnd that yse and underscode ( _ ) not a space.
Originally Posted by big_mon
xlApp.Cells(8, 4).Formula = "= Op_Pg_3!E21"
Since you have spaces in the page name, try this:
xlApp.Cells(8, 4).Formula = "= [Op Pg 3[!E21"
The advice is right but there's a typo:
xlApp.Cells(8, 4).Formula = "= [Op Pg 3]!E21"
Thank you for your replies.
I did not get those errors I mentioned, however I got a new error message "Application defined or object-defined error" and cell(8,4) in "Op Pg 1" is blank.
What does those errors mean? Did I miss out something in declaring DIM or something?