View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
kdw kdw is offline
external usenet poster
 
Posts: 13
Default 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