Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel Macro
I am having a Excel file having Excel Macro embedded. The simplest way to call that excel macro will to pass it the keyboard shortcut throgh QM. Is it possible to embed that macro in QM as a code piece rather than passing the keys to excel. The Excel Macro contains processes of sorting list, auto fitting etc.
run excel macro from qm without keyboard
Copy      Help
;/exe 1
ExcelSheet es.Init"excel macro name")
The problem is each QM code is run a new excel file is to be created so the macro cannot be called.
You say you can run the excel macro using keyboard shortcut. Then also should work.

Or you can convert the excel macro to QM. You cannot simply embed it in QM. Some changes needed.
My mistake earlier I did not told you that a new file will be created so the first one will not work. How can I convert a excel macro to QM. Just provide me an example where the opened excel file columns are selected and format is set to "0.00". VB code this will be :
Selection.NumberFormat = "#,##0.00"
Copy      Help
;/exe 1
ExcelSheet es.Init

a.Selection.NumberFormat = "#,##0.00"

As you see, i only appended a. to every function. Other macros may require some more changes. For example, join lines when split using _.
OK one example for sorting also.

Forum Jump:

Users browsing this thread: 1 Guest(s)