Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to execute macro from vb 6.0 code?
Hi All,
I have a macro which will take string array as input and ll display it into the excel sheet. But I dont know how to call it frm vb application? Please help me for the same. Thanks n Regards, Deepak |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to execute macro from vb 6.0 code?
these both worked for me from within Excel:
Sub Main() Dim vArray As Variant vArray = Range("A1:B10") Application.Run "Macro1", vArray End Sub Sub tester() Dim vArray As Variant vArray = Range("A1:B10") Macro1 vArray End Sub Sub Macro1(v As Variant) Debug.Print LBound(v, 1), UBound(v, 1) Debug.Print LBound(v, 2), UBound(v, 2) Debug.Print v(UBound(v, 1), UBound(v, 2)) End Sub I don't know whether you don't know about RUN or you are saying it doesn't work with an array using automation. -- Regards, Tom Ogilvy "B Deepak" wrote in message ... Hi All, I have a macro which will take string array as input and ll display it into the excel sheet. But I dont know how to call it frm vb application? Please help me for the same. Thanks n Regards, Deepak |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to execute macro from vb 6.0 code?
Can u plse provide me sample VB application for doin this?
I m new to vb :). Please do the needful. Thanks, Deepak "Tom Ogilvy" wrote in message ... these both worked for me from within Excel: Sub Main() Dim vArray As Variant vArray = Range("A1:B10") Application.Run "Macro1", vArray End Sub Sub tester() Dim vArray As Variant vArray = Range("A1:B10") Macro1 vArray End Sub Sub Macro1(v As Variant) Debug.Print LBound(v, 1), UBound(v, 1) Debug.Print LBound(v, 2), UBound(v, 2) Debug.Print v(UBound(v, 1), UBound(v, 2)) End Sub I don't know whether you don't know about RUN or you are saying it doesn't work with an array using automation. -- Regards, Tom Ogilvy "B Deepak" wrote in message ... Hi All, I have a macro which will take string array as input and ll display it into the excel sheet. But I dont know how to call it frm vb application? Please help me for the same. Thanks n Regards, Deepak |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to execute macro from vb 6.0 code?
I am posting in an Excel group. While there may be many here who have VB6
installed, I am not one of them. -- Regards, Tom Ogilvy "B Deepak" wrote in message ... Can u plse provide me sample VB application for doin this? I m new to vb :). Please do the needful. Thanks, Deepak "Tom Ogilvy" wrote in message ... these both worked for me from within Excel: Sub Main() Dim vArray As Variant vArray = Range("A1:B10") Application.Run "Macro1", vArray End Sub Sub tester() Dim vArray As Variant vArray = Range("A1:B10") Macro1 vArray End Sub Sub Macro1(v As Variant) Debug.Print LBound(v, 1), UBound(v, 1) Debug.Print LBound(v, 2), UBound(v, 2) Debug.Print v(UBound(v, 1), UBound(v, 2)) End Sub I don't know whether you don't know about RUN or you are saying it doesn't work with an array using automation. -- Regards, Tom Ogilvy "B Deepak" wrote in message ... Hi All, I have a macro which will take string array as input and ll display it into the excel sheet. But I dont know how to call it frm vb application? Please help me for the same. Thanks n Regards, Deepak |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to execute macro from vb 6.0 code?
Hi TOm,
Can u plse give me the sample code which will execute macro from vb application? Thanks, Deepak "Tom Ogilvy" wrote in message ... these both worked for me from within Excel: Sub Main() Dim vArray As Variant vArray = Range("A1:B10") Application.Run "Macro1", vArray End Sub Sub tester() Dim vArray As Variant vArray = Range("A1:B10") Macro1 vArray End Sub Sub Macro1(v As Variant) Debug.Print LBound(v, 1), UBound(v, 1) Debug.Print LBound(v, 2), UBound(v, 2) Debug.Print v(UBound(v, 1), UBound(v, 2)) End Sub I don't know whether you don't know about RUN or you are saying it doesn't work with an array using automation. -- Regards, Tom Ogilvy "B Deepak" wrote in message ... Hi All, I have a macro which will take string array as input and ll display it into the excel sheet. But I dont know how to call it frm vb application? Please help me for the same. Thanks n Regards, Deepak |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code won't execute... | Excel Programming | |||
Execute code on server | Excel Programming | |||
Why does this code take so long to execute. | Excel Programming | |||
When does Code Execute on a List Box? | Excel Programming | |||
execute code for all 12 months | Excel Programming |