Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

excel setup sheet possibilities


Roger Peterson
 Share

Recommended Posts

Gismo, I've been playing again with little success. Here is what I have in my string select from your first setup sheet example:

code:

 

s0 'Dim xs'

s01 'set wb = getobject("F:mcam91MillNCProcess Sheet for Carbon.xls")'

s02 'set sheet("toollist").select = true'

s03 ##"Set newBook = xs.Workbooks.Add"

s04 'With ws.activesheet'

s05 '.cells(1,1).value="Tool Number"'

s06 '.cells(1,2).value="Tool Name"'

s07 '.cells(1,3).value="Tool Diameter"'

s08 '.cells(1,4).value="Tool Corner Radius"'

s09 '.range("A1:G1").Select'

s10 "xs.selection.font.bold=true"

s11 '.Columns("A:G").Select'

s12 "xs.selection.HorizontalAlignment = -4108"

s13 '.Columns("A:G").EntireColumn.AutoFit'

s14 '.range("A2").Select'

s15 "End With"

s16 ".cells("

s17 ').value="'

s18 '"'

s19 ","

svbs

fstrsel s0 line svbs


Basically I am trying to do exactly what your first example of a setup sheet did but open an existing setup sheet and select the toollist sheet as my active sheet to write my tool info on. I would appreciate any help you can give. So far I am pretty excited about being able to place all of the tool info into a spreadsheet.

 

Thanks again for all the help,

Link to comment
Share on other sites

Hi Roger,

 

sorry for my late reply.

Here is the answer.

code:

 s0 'Dim xs'

s01 'Set xs=CreateObject("Excel.Application")'

s02 "xs.visible=true"

s03 'xs.Workbooks.Open("c:t.xls")

s04 'With xs.Workbooks("t.xls").Worksheets("Test")'

s05 '.cells(1,1).value="WZ-Nr."'

s06 '.cells(1,2).value="WZ-Name"'

s07 '.cells(1,3).value="WZ-Durchmesser"'

s08 '.cells(1,4).value="WZ-Eckradius"'

s09 '.range("A1:G1").Select'

s10 "xs.selection.font.bold=true"

s11 '.Columns("A:G").Select'

s12 "xs.selection.HorizontalAlignment = -4108"

s13 '.Columns("A:G").EntireColumn.AutoFit'

s14 '.range("A2").Select'

s15 "End With"

s16 ".cells("

s17 ').value="'

s18 '"'

s19 ","

Note: "Test" is the required sheet name. In my excel book it's the second sheet.

 

Hope this helps you.

 

regards

cheers.gif

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.

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.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...