Jump to content
Darkforce

how to make this bottom to run a marco

Recommended Posts

Darkforce

I want to run this code

 

 

[font=Times New Roman][size=3]  
[/size][/font]
[color=black][font="Courier New"]On Error Resume Next[/font][/color]
[font=Times New Roman][size=3]  
[/size][/font]
[color=black][font="Courier New"]Dim oDrawDoc As DrawingDocument[/font][/color]
[font=Times New Roman][size=3]  
[/size][/font]
[color=black][font="Courier New"]oDrawDoc = ThisApplication.ActiveDocument[/font][/color]
[font=Times New Roman][size=3]  
[/size][/font]
[color=black][font="Courier New"]Dim oPartsList As PartsList[/font][/color]
[font=Times New Roman][size=3]  
[/size][/font]
[color=black][font="Courier New"]oPartsList = oDrawDoc.ActiveSheet.PartsLists.Item(1)[/font][/color]
[font=Times New Roman][size=3]  
[/size][/font]
[color=black][font="Courier New"]If Not oPartsList Is Nothing Then [/font][/color]
[font=Times New Roman][size=3]  
[/size][/font]
[color=black][font="Courier New"]Call oPartsList.Sort("PART NUMBER")[/font][/color]
[font=Times New Roman][size=3]  
[/size][/font]
[color=black][font="Courier New"]oPartsList.Renumber[/font][/color]
[font=Times New Roman][size=3]  
[/size][/font]
[color=black][font="Courier New"]oPartsList.SaveItemOverridesToBOM[/font][/color]
[font=Times New Roman][size=3]  
[/size][/font]
[color=black][font=Calibri][size=3]End If[/size][/font][/color]
[font=Times New Roman][size=3]  
[/size][/font]

 

 

when it is write as a ilogic code it Works..

 

 

 

 

what I want to do is the want a bottum that do the same thing.. and the code make a error ... I am new to this ... can you help?

Edited by SLW210
Added Code Tags

Share this post


Link to post
Share on other sites
SLW210

Please read the Code Posting Guidelines and edit your Code to be included in Code Tags.[NOPARSE]

Your Code Here[/NOPARSE]

=

Your Code Here

Share this post


Link to post
Share on other sites
Darkforce

is there a way to edit my post ?

Share this post


Link to post
Share on other sites
SLW210

Do you have an "Edit Post" button to bottom right of your post?

 

I fixed it for you new members may not have the ability to edit, not sure.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×