Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to: Call for another vbscript ?

Status
Not open for further replies.

canix1

Technical User
Oct 22, 2001
12
0
0
SE
Hi there!

I´m wondering how to call a second VBscript with the data from the first VBscript. Example:
script1 run querys - sends the data to script2 - script2 writes data in Excel workbook.
Then I can reuse script2 for other things.
How to do?

Regards Robin
 
Do you want script2 to run as a separate process, or are you asking how to do an include?

Can I assume this is a WSH script, or is it something else?
 
I think it would be an include, what would I gain on an separate process.
This is a WSH script for the engines Wscript or Cscript.

Regards Robin
 
That works in Excel but how do I re-write it so I can run it in an .vbs-file?
I´m verry new at this!!

That:

Sub atest()
For Each cell In Range("A:A")
cell.Select
If LastLine Then
MsgBox cell.Row
Exit For
End If
Next
End Sub
Function LastLine() As Boolean
With ActiveCell
If IsEmpty(.Value) Then
If .End(xlDown).Row = Cells.Rows.Count Then _
LastLine = True
Exit Function
Else
LastLine = False
End If
End With
End Function
 
Hmm...

Your Excel code looks like VBA, not VBScript.

There is no typing in VBScript. Everything's a Variant.

I don't think there IS an "include" in VBA. At least I can't find one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top