-
Jul 14th, 2008, 07:58 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] vbTab vbCrLf
is there a vb.. for leaving the rest of the page empty and start a new page.. like control enter in Word ..
-
Jul 14th, 2008, 09:00 AM
#2
Frenzied Member
Re: vbTab vbCrLf
If you are referring to VBA, in Excel the following installs a page break, and then moves it to a different row ... above Row 9 ...
Code:
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
Set ActiveSheet.HPageBreaks(1).Location = Range("A9")
It is just a 'quickie' that I recorded during an "Insert > Page Break" operation.
Blessings in abundance,
All the Best,
& ENJOY!
Art . . . . Carlisle, PA . . USA
-
Jul 14th, 2008, 11:36 AM
#3
Fanatic Member
Re: vbTab vbCrLf
You'll be using the InsertBreak method of the selection or range objects.
Code:
Selection.InsertBreak wdPageBreak
-
Jul 14th, 2008, 12:00 PM
#4
Re: vbTab vbCrLf
Which Office app are you needing this in?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 14th, 2008, 12:02 PM
#5
Thread Starter
Hyperactive Member
Re: vbTab vbCrLf
yeah ... should have mention which application i was using .. its word
Selection.InsertBreak works .. tnx
-
Jul 14th, 2008, 12:27 PM
#6
Re: [RESOLVED] vbTab vbCrLf
Recording a macro always helps to shed some light on how MS does it.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 14th, 2008, 01:46 PM
#7
Thread Starter
Hyperactive Member
Re: [RESOLVED] vbTab vbCrLf
yes. . will use it the next time
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|