Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-14-2013, 01:37 PM
grstools grstools is offline sequential numbering with macro Windows XP sequential numbering with macro Office 2003
Novice
sequential numbering with macro
 
Join Date: Aug 2013
Posts: 3
grstools is on a distinguished road
Default sequential numbering with macro


Hi, my first post. Hope you can help. Using Word 2003 to try to make a template[s] with sequential numbering using a macro created by Graham Mayor. I have followed the instruction but don't achieve the final numbering. I'm confused by 2 things in the instructions. 1 When in the macro editor, the macro name is there and I'm told to paste the macro code OVER it. What does this mean? Where exactly do I paste the code? 2 When I go to another instruction, file> properties > custom and insert the InvNum words, I need a value to be able to save it. What do I put as a value. If I can do these 2 things I should be able to get this template working, I hope. Best regards, grstools.
Reply With Quote
  #2  
Old 08-15-2013, 11:40 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline sequential numbering with macro Windows 7 64bit sequential numbering with macro Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 4,011
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

If you have a macro that is already "named," that is, the code lines include Sub and End Sub, you only have to copy the whole code block into the Visual Basic Editor.

For more specific assistance, tell us which code you are using.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #3  
Old 08-15-2013, 12:11 PM
grstools grstools is offline sequential numbering with macro Windows XP sequential numbering with macro Office 2003
Novice
sequential numbering with macro
 
Join Date: Aug 2013
Posts: 3
grstools is on a distinguished road
Default Sequential numbering with Macro

Hi Stefan, I go to macro and insert the name AutoNew and create. Then in vb editor it shows as:
Sub AutoNew ()
'
' AutoNew Macro
'
End Sub

Now as per instructions, I highlight AutoNew and paste the code over it. This then shows in yellow:
SubSub AutoNew (), then at the bottom there are 2 End Sub one is greyed.
I'm obviously pasting it wrongly. Thanks.Graeme.
Reply With Quote
  #4  
Old 08-15-2013, 12:27 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline sequential numbering with macro Windows 7 64bit sequential numbering with macro Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 4,011
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

If you see two "End Sub" (one immediately after the other), delete one of them.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #5  
Old 08-15-2013, 12:51 PM
grstools grstools is offline sequential numbering with macro Windows XP sequential numbering with macro Office 2003
Novice
sequential numbering with macro
 
Join Date: Aug 2013
Posts: 3
grstools is on a distinguished road
Default sequential numbering with macro

Hi Stefan, I can delete the End Sub ok. Pasting is the problem. I highlight AutoNew () as the macro name and then get SubSub AutoNew () in red. Do I have to delete one of these Sub things also? Graeme.
Reply With Quote
  #6  
Old 08-15-2013, 03:40 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline sequential numbering with macro Windows 7 64bit sequential numbering with macro Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 4,011
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

Yes, replace "SubSub" with "Sub" only.

Note that if you are letting Word create a "blank" macro, it adds "Sub <NameOfMacro>" and "End Sub" for you, and when you paste code that already includes these commands, you get duplicates.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
sequential numbering with macro How do I do a Sequential Numbering? gburya Word VBA 26 07-04-2017 03:29 PM
sequential numbering with macro Sequential Print Numbering RetailPoint Word VBA 14 01-14-2015 09:51 AM
sequential numbering with macro Sequential Document Numbering Geza59 Word VBA 18 01-15-2014 01:43 AM
sequential numbering with macro How to keep sequential numbering with multiple pages GeneOliver PowerPoint 1 10-01-2012 11:26 PM
sequential numbering with macro Sequential Numbering jdwoods Word VBA 7 12-16-2011 05:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:03 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft