ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Embed VBA in worksheet (https://www.excelbanter.com/excel-programming/407204-embed-vba-worksheet.html)

kdw

Embed VBA in worksheet
 
I am using a 3 party vendor software where I have limited access to Excel's
object model, but I need to be able to programmically change some page
settings. Is there a way to embed some VBA code in like a cell or something
and then have Excel run those codes somehow?

What other choices do I have?

Thanks.
kdw

Mark Ivey[_2_]

Embed VBA in worksheet
 
When I need to refer to information that the user can change, I utilize
specific cells for variable values.

For example:
You could use cell A1 to input the date and have your code reference this
cell to fill a variable with that value.

Would something like this suffice?

Mark Ivey



"kdw" wrote in message
...
I am using a 3 party vendor software where I have limited access to
Excel's
object model, but I need to be able to programmically change some page
settings. Is there a way to embed some VBA code in like a cell or
something
and then have Excel run those codes somehow?

What other choices do I have?

Thanks.
kdw



kdw

Embed VBA in worksheet
 
Not quite. What I need is the ability to run a few lines of VBA codes (that
change the page setup) that I will programmically put in a cell, or somewhere
on the worksheet.

This situation is this - I am using 3rd party software to create an Excel
workbook and export data to, which works great. But one of the user
requirement is for us to make sure the data is to print on two pages only.
So I need to programmically alter the page setup of this newly created
workbook.

How do I send the codes to this new workbook to do that?

BTW, the data is coming from an ASP page.

Thanks,
kdw



"Mark Ivey" wrote:

When I need to refer to information that the user can change, I utilize
specific cells for variable values.

For example:
You could use cell A1 to input the date and have your code reference this
cell to fill a variable with that value.

Would something like this suffice?

Mark Ivey



"kdw" wrote in message
...
I am using a 3 party vendor software where I have limited access to
Excel's
object model, but I need to be able to programmically change some page
settings. Is there a way to embed some VBA code in like a cell or
something
and then have Excel run those codes somehow?

What other choices do I have?

Thanks.
kdw




All times are GMT +1. The time now is 11:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com