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

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...