File Exchange
Try Origin for Free
The Origin Forum
Home
|
Profile
|
Register
|
Active Topics
|
Members
|
Search
|
FAQ
|
Send File to Tech support
All Forums
Origin Forum for Programming
Forum for Automation Server/COM and LabVIEW
Excel VBA - copy range & execute labtalk script
Note:
Only the poster of this message, and the Moderator can edit the message.
Screensize:
640 x 480
800 x 600
1024 x 768
1280 x 1024
UserName:
Password:
Anti-Spam Code:
Format Mode:
Basic
Help
Prompt
Format:
Font
Andale Mono
Arial
Arial Black
Book Antiqua
Century Gothic
Comic Sans MS
Courier New
Georgia
Impact
Lucida Console
Script MT Bold
Stencil
Tahoma
Times New Roman
Trebuchet MS
Verdana
Size
1
2
3
4
5
6
Color
Black
Red
Yellow
Pink
Green
Orange
Purple
Blue
Beige
Brown
Teal
Navy
Maroon
LimeGreen
Forum:
Forum for Automation Server/COM and LabVIEW
Subject:
Message:
* HTML is OFF
*
Forum Code
is ON
Smilies
Origin Ver. and Service Release (Select Help-->About Origin): 9.1 Operating System: winxp while being an absolute beginner isn't very helpful at all, I am still taken aback how I can't even get simple tutorial copies to work: beginner project: from an open excel sheet, copy a range of strings into a new book in a new origin project. then run a labtalk script, save and exit. While I can select my excel range, I cannot assign it to a variable that I can then insert into the origin range. I also just cannot get the labtalk script to run with what I think should work. Dim org As Origin.Application Dim orgWkBk As Origin.WorksheetPage Dim orgWks As Origin.Worksheet Dim strPathName As Variant Dim rangeexcel As Excel.range Dim rangeori As Origin.DataRange sheetname = ActiveSheet.Name Range("c3", ActiveSheet.Range("c3").End(xlDown)).Select ' Create the Origin COM object, folder wkbk sheet and column works fine Set org = New Origin.Application org.NewProject org.Execute ("sec -poc 1.5") org.RootFolder.Folders.Add("Folder1").Activate 'add new folder Set orgWkBk = org.WorksheetPages.Add Set orgWks = orgWkBk.Layers(0) orgWks.Columns.Add Set rangeori = Wks.NewDataRange(0, 1) rangeori.SetData = (ActiveSheet.range("c3", ActiveSheet.range("c3").End(xlDown)).Select) org.Execute (name_of_custom_labtalkscript) 'saving also works strPathName = Application.GetSaveAsFilename(sheetname, "Project files (*.OPJ),*.OPJ", 0) org.Save (strPathName) org.Execute ("sec -poc 1.5") org.Exit End Sub
Check here to subscribe to this topic.
The Origin Forum
© 2020 Originlab Corporation
Snitz Forums 2000