Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am not sure if I am repeating the question, but tried searching the solution in forum could not find it.
Can any one help me on how I can call a Sub from load script from Macro.
For example in the Script Window I have this Sub
//In Script Window
Sub Test
let vr='Test Run'; // this is just for example, but originally some calculation to be done in the script
End Sub
Now I have a button where I have assigned an action to call a macro. Can I call the above sub with that macro?
I tried like below
'***In Macro Window ****
Sub CallFunctionFromScript()
Call Test
End Sub
But its not working, Every time I click the button the Macro window opens and stops, obviously I am missing something here.
Please help.
Hi Anurag,
I am not sure what is the purpose of your requirement. You can simply implement the calculation in macro itself ?? If you could explain the reason behind your requirement, we may suggest a better solution. But I don't want to disappoint you. Have a look at the attached file. If your file is a desktop application (reloading application from access point through button click will not work) then below attached file should work. Let us know.
tamilarasu would you be able to advise on this
Hi Anurag,
I am not sure what is the purpose of your requirement. You can simply implement the calculation in macro itself ?? If you could explain the reason behind your requirement, we may suggest a better solution. But I don't want to disappoint you. Have a look at the attached file. If your file is a desktop application (reloading application from access point through button click will not work) then below attached file should work. Let us know.
Thank you Exactly what I wanted.
But to explain the requirement in detail, I have a data table holding data for several months Column wise. In another table I have Exchange rates for various month for different countries.
Data Table
Country | Product | JAN | FEB | MAR |
C1 | P1 | 4 | 6 | 9 |
C2 | P1 | 7 | 8 | 7 |
C3 | P1 | 6 | 7 | 4 |
C3 | P2 | 6 | 4 | 6 |
C4 | P1 | 6 | 6 | 5 |
C4 | P2 | 6 | 5 | 4 |
C4 | P3 | 4 | 7 | 4 |
Exchange Rate
Country | JAN | FEB | MAR |
C1 | 9 | 4 | 6 |
C2 | 7 | 6 | 5 |
C3 | 8 | 6 | 8 |
C4 | 8 | 7 | 6 |
What I am tyring to do now is to create another temp table based on my exchange rate month selection. I need standard rate to be applied. If I have selected MAR, then in Jan data also the match value to be applied.
So I needed an action where I can trigger a script to do that.
Thank you Sunny