Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pagebreak and Zoom problem
Hello NG,
Anyone knows why I keep getting the same debug.print result using the code below? Isn't in suppose to change? Any line of code that I need to add? Please help! Sub Testing() Dim i As Integer For i = 0 To 50 ActiveSheet.PageSetup.Zoom = 100 - i Debug.Print ActiveSheet.VPageBreaks(1).Location.Address Next i End Sub TIA Jon-jon |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pagebreak and Zoom problem
You've typed pagebreaks(ONE) not pagebreaks(i)
JON JON wrote: Hello NG, Anyone knows why I keep getting the same debug.print result using the code below? Isn't in suppose to change? Any line of code that I need to add? Please help! Sub Testing() Dim i As Integer For i = 0 To 50 ActiveSheet.PageSetup.Zoom = 100 - i Debug.Print ActiveSheet.VPageBreaks(1).Location.Address Next i End Sub TIA Jon-jon |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pagebreak and Zoom problem
Yes! that's one (1).
wrote in message oups.com... You've typed pagebreaks(ONE) not pagebreaks(i) JON JON wrote: Hello NG, Anyone knows why I keep getting the same debug.print result using the code below? Isn't in suppose to change? Any line of code that I need to add? Please help! Sub Testing() Dim i As Integer For i = 0 To 50 ActiveSheet.PageSetup.Zoom = 100 - i Debug.Print ActiveSheet.VPageBreaks(1).Location.Address Next i End Sub TIA Jon-jon |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pagebreak and Zoom problem
Please help!
"JON JON" wrote in message ... Yes! that's one (1). wrote in message oups.com... You've typed pagebreaks(ONE) not pagebreaks(i) JON JON wrote: Hello NG, Anyone knows why I keep getting the same debug.print result using the code below? Isn't in suppose to change? Any line of code that I need to add? Please help! Sub Testing() Dim i As Integer For i = 0 To 50 ActiveSheet.PageSetup.Zoom = 100 - i Debug.Print ActiveSheet.VPageBreaks(1).Location.Address Next i End Sub TIA Jon-jon |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pagebreak and Zoom problem (Unresolved)
Sorry if I sound impatient but I just really need help fast.
"JON JON" wrote in message ... Please help! "JON JON" wrote in message ... Yes! that's one (1). wrote in message oups.com... You've typed pagebreaks(ONE) not pagebreaks(i) JON JON wrote: Hello NG, Anyone knows why I keep getting the same debug.print result using the code below? Isn't in suppose to change? Any line of code that I need to add? Please help! Sub Testing() Dim i As Integer For i = 0 To 50 ActiveSheet.PageSetup.Zoom = 100 - i Debug.Print ActiveSheet.VPageBreaks(1).Location.Address Next i End Sub TIA Jon-jon |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pagebreak and Zoom problem (Unresolved)
I'm confused - I've answered the question - you are looping through an
iteration of a loop i times, but each time you are displaying the Location.Address of ActiveSheet.VPageBreaks(ONE) and not the i'th VPageBreaks. JON JON wrote: Sorry if I sound impatient but I just really need help fast. "JON JON" wrote in message ... Please help! "JON JON" wrote in message ... Yes! that's one (1). wrote in message oups.com... You've typed pagebreaks(ONE) not pagebreaks(i) JON JON wrote: Hello NG, Anyone knows why I keep getting the same debug.print result using the code below? Isn't in suppose to change? Any line of code that I need to add? Please help! Sub Testing() Dim i As Integer For i = 0 To 50 ActiveSheet.PageSetup.Zoom = 100 - i Debug.Print ActiveSheet.VPageBreaks(1).Location.Address Next i End Sub TIA Jon-jon |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pagebreak and Zoom problem (Unresolved)
Hello,
Maybe I should elaborate: ActiveSheet.PageSetup.Zoom = 100 - i would reduce the zoom setting of the page set-up by 1 each loop. By reducing the zoom settings, the automatic page break created by excel should also adjust thus changing the value of ActiveSheet.VPageBreaks(1).Location.Address (I don't need the value of ith pagebreak but only the first). wrote in message ups.com... I'm confused - I've answered the question - you are looping through an iteration of a loop i times, but each time you are displaying the Location.Address of ActiveSheet.VPageBreaks(ONE) and not the i'th VPageBreaks. JON JON wrote: Sorry if I sound impatient but I just really need help fast. "JON JON" wrote in message ... Please help! "JON JON" wrote in message ... Yes! that's one (1). wrote in message oups.com... You've typed pagebreaks(ONE) not pagebreaks(i) JON JON wrote: Hello NG, Anyone knows why I keep getting the same debug.print result using the code below? Isn't in suppose to change? Any line of code that I need to add? Please help! Sub Testing() Dim i As Integer For i = 0 To 50 ActiveSheet.PageSetup.Zoom = 100 - i Debug.Print ActiveSheet.VPageBreaks(1).Location.Address Next i End Sub TIA Jon-jon |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pagebreak and Zoom problem (SOLVED)
Hello All,
I solve my problem by myself. I am posting for the benefit of those would later need it. Below is the modify code Sub Testing() Dim i As Integer For i = 0 To 50 ActiveSheet.PageSetup.Zoom = 100 - i ActiveWindow.View = xlPageBreakPreview Debug.Print ActiveSheet.VPageBreaks(1).Location.Address ActiveWindow.View = xlNormalView Next i End Sub I guess the changing of ActiveWindow.View is required for the value of the ActiveSheet.VPageBreaks(1).Location.Address be updated. I also try putting the changing of view outside the loop to save runtime but this does not work. Till next time. Thank you for taking time solving my problem "JON JON" wrote in message ... Hello, Maybe I should elaborate: ActiveSheet.PageSetup.Zoom = 100 - i would reduce the zoom setting of the page set-up by 1 each loop. By reducing the zoom settings, the automatic page break created by excel should also adjust thus changing the value of ActiveSheet.VPageBreaks(1).Location.Address (I don't need the value of ith pagebreak but only the first). wrote in message ups.com... I'm confused - I've answered the question - you are looping through an iteration of a loop i times, but each time you are displaying the Location.Address of ActiveSheet.VPageBreaks(ONE) and not the i'th VPageBreaks. JON JON wrote: Sorry if I sound impatient but I just really need help fast. "JON JON" wrote in message ... Please help! "JON JON" wrote in message ... Yes! that's one (1). wrote in message oups.com... You've typed pagebreaks(ONE) not pagebreaks(i) JON JON wrote: Hello NG, Anyone knows why I keep getting the same debug.print result using the code below? Isn't in suppose to change? Any line of code that I need to add? Please help! Sub Testing() Dim i As Integer For i = 0 To 50 ActiveSheet.PageSetup.Zoom = 100 - i Debug.Print ActiveSheet.VPageBreaks(1).Location.Address Next i End Sub TIA Jon-jon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cant move pagebreak in PageBreak View in Excel2003 | Excel Worksheet Functions | |||
Excel 2000 PageBreak problem | Excel Discussion (Misc queries) | |||
PageBreak problem. How to improve performance? | Excel Programming | |||
Pagebreak function problem | Excel Programming | |||
Zoom problem | Excel Programming |