How to edit an excel file programatically using Access VBA?

B

baka_deshi

Hello, I am creating a form where I could input data to my access database. I
also have this "Export" button in my form such that whenever I click on it,
the data on the form would be transferred to a pre-formatted Excel file.
After this, the changes on the file will be saved, then the file will be
closed.

I first tried to embed the excel worksheet to a new form, and I was
successful in writing the values into specific cells. But I also have to
paste an image on it. I tried
Me.xlsOutput.worksheets("Sheet1").pictures.insert(imgPath)
it works fine. But i am not familiar as on how to resize it an place it to
the appropriate position in my worksheet.

Can someone help me on this? Thanks.
 
P

pietlinden

Hello, I am creating a form where I could input data to my access database. I
also have this "Export" button in my form such that whenever I click on it,
the data on the form would be transferred to a pre-formatted Excel file.
After this, the changes on the file will be saved, then the file will be
closed.

I first tried to embed the excel worksheet to a new form, and I was
successful in writing the values into specific cells. But I also have to
paste an image on it. I tried
Me.xlsOutput.worksheets("Sheet1").pictures.insert(imgPath)
it works fine. But i am not familiar as on how to resize it an place it to
the appropriate position in my worksheet.

Can someone help me on this? Thanks.

there's an explanation of how to transfer Access data to Excel using
automation at www.mvps.org in the modules section, I think.
 
B

baka_deshi

thanks a million...i find the site very helpful! :) i'm still searching
though on how to properly position and resize my inserted image... T.T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top