Getting values of pagesetup for passing arguments to xl4 page.setup function.

  • Thread starter Thread starter masayoshi hayashi
  • Start date Start date
M

masayoshi hayashi

I have a reference worksheet for copying its pagesetup properties to
other worksheets. I plan to use xl4 page.setup function for setting
values of those sheets. Could anyone let me know an equivalent
function in xl4 for getting values of pagesetup properties of a
worksheet for the reference sheet? (such that I only have to pass
arguments to page.setup function.)

I have searched for macrofun.exe help file but could not find one yet.

I use Excel 2000 and 2002.
 
Thanks Tom for the links.

I figured out Get.Document() function returns page setup values. But
while attempting to extract a value from the array returned from
Get.Document(52),
it seems to return only a single value, not an array.

The macrofun help for Get.Document(52) function states:
52 Four-item horizontal array indicating the margin settings (left,
right, top, bottom) in the currently specified units.

In the Immediate window of Excel 2002, I tried
?ExecuteExcel4Macro("Get.Document(52)")
This returns a single value in Double for left margin.

?isarray(ExecuteExcel4Macro("Get.Document(52)"))
False

Am I missing something here or how would you get right, top and bottom
margin values from Get.Document(52) function?
 

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

Back
Top