0

I search answers on this site , but they do not have complete info

I have a file c: ....test.xlsm it has a subroutine test ()

sub test () 
msgbox "hello stackoverflow"
end sub

I want to write a vbscript that would

1) open c: ....test.xlsm

2) run test () subroutine

3) close c: ....test.xlsm

How can I do this ?

1 Answer 1

1

Assuming it is in a module, you would call it like so

dim eApp
set eApp = GetObject("C:\wb.xlsm")
eApp.Application.Run "wb.xlsm!test"
set eApp = nothing

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.