Jump to content

how to make this bottom to run a marco


Darkforce

Recommended Posts

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...