Excel BUG in macro recording (every version)

W

w

I have found a bug in every Excel version, where can i post it?

1) Start recording a new Macro
2) Go to Print Preview
3) Adjust a margin
4) Stop recording

The macro contains errors because it has empty parameters for the margins:

With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.84)
.RightMargin = Application.InchesToPoints()
.TopMargin = Application.InchesToPoints()
.BottomMargin = Application.InchesToPoints()
.HeaderMargin = Application.InchesToPoints()
.FooterMargin = Application.InchesToPoints()
 
N

Nick Hodge

w

From XL2003

..LeftMargin = Application.InchesToPoints(0.78740157480315)
..RightMargin = Application.InchesToPoints(0.78740157480315)
..TopMargin = Application.InchesToPoints(0.78740157480315)
..BottomMargin = Application.InchesToPoints(0.78740157480315)
..HeaderMargin = Application.InchesToPoints(0.590551181102362)
..FooterMargin = Application.InchesToPoints(0.590551181102362)

I cannot test earlier versions as I don't have them, but I suspect it is
only recording the change. I changed all of them for the above.
 
J

Jerry W. Lewis

Which way did you change the margins? Graphically from the Margins
button, or numerically from the Page Setup button? In 2000 and XP, the
graphic approach fails to record values that were not changed, resulting
in code that will not run.

Jerry
 
W

w

Graphically, if i set the margins manually it works, but if i do it from the
preview
every excel version (2003 as well) has this bug.

Elio



----- Original Message -----
From: "Jerry W. Lewis" <post_a_reply@no_e-mail.com>
Newsgroups: microsoft.public.excel
Sent: Sunday, October 12, 2003 1:25 PM
Subject: Re: Excel BUG in macro recording (every version)
 

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