HELP.... Re http://www.mrexcel.com/tip081.shtml

astaga

New Member
Joined
Sep 8, 2006
Messages
4
Hi,
I am having no progress trying to get the vertical spacing aligned correctly to the labels I have.
Have spent the last 4 to 5 hours trying all possibilities but am not able to get it.
When I do get it right for page 1, pages 2, 3, 4 etc... are off.
Any help appreciated.

FYI, my labels are: Avery 3 by 10 layout
Label Size is 2.5 inch long by 1 inch high
Distance from Label Top to Top of Page is 0.9 inch

Here is relevant code from the web reference above
:
' Set up row heights
If NextCol = 1 Then
WSL.Cells(NextRow, 1).Resize(4, 1).RowHeight = 16
WSL.Cells(NextRow + 4, 1).RowHeight = 13.25
End If

The above numbers get the ten rows of labels set out correctly, except that they all print onto my page with the first line outside the label area ie. I lose the first line. If I use the print margin settings to adjust page 1 ok, subsequent pages are all off. Please help.........
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Welcome to the Board!

Why not mail merge to Word and use the Label Wizard? It's got pre-defined templates for most Avery labels. (No point in trying to recreate the wheel).

Smitty
 
Upvote 0
The reason is precisely as stated in the document.
Wow - 23 steps, so I am trying to do it in VBA as a one button click process. (You know how users are, just give them a simple approach and there's less chance of errors!)

astaga
 
Upvote 0
I have another question which I hope someone here can help.

How do I "insert" blank vertical spaces onto the top of the page so all the labels are pushed down 0.3".
This should "fix" it...

Any help please....
 
Upvote 0
Excel VBA for top & bottom margins?

I managed to fix the problem described earlier via the margin settings...
Had to set bottom margin to 0.

BTW, is it possible to set these parameters for a page
ie. Top, Bottom, Right and Left margins in the VBA code?
How would this be done?

Thanks.
 
Upvote 0
/quote]is it possible to set these parameters for a page
ie. Top, Bottom, Right and Left margins in the VBA code?
How would this be done? [/quote]

Sure:

<font face=Tahoma>    <SPAN style="color:#00007F">With</SPAN> ActiveSheet.PageSetup
        .LeftMargin = Application.InchesToPoints(0.5)
        .RightMargin = Application.InchesToPoints(0.5)
        .TopMargin = Application.InchesToPoints(0.75)
        .BottomMargin = Application.InchesToPoints(0.75)
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

Smitty
 
Upvote 0

Forum statistics

Threads
1,225,761
Messages
6,186,891
Members
453,383
Latest member
SSXP

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top