Desktop Application By Excel VBA

meakashgfx

New Member
Joined
Dec 9, 2014
Messages
33
Hello Everyone,

I designed a VBA User Form that does something automatic excel opens and copy-paste macros then close them. But can I compile this VBA Forms as a Desktop application anyhow?

Thanks
Akash
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
A VBA UserForm resides inside the workbook in which it was designed. But you can trigger the macro inside the workbook from an executable file. I created a VBS file with following code:

Code:
Set objExcel=CreateObject("Excel.Application")
objExcel.Visible=False
Set objWorkbook=objExcel.Workbooks.Open("[COLOR=#0000ff]C:\TestingResults\MacroFile.xlsm[/COLOR]")
objExcel.Run "[COLOR=#0000ff]TriggerTest[/COLOR]"
objExcel.DisplayAlerts = false
objWorkbook.close
objExcel.quit

And inside the workbook I created the sub

Code:
Sub TriggerTest()
    frmTest.Show
End Sub

With this setup you see the form, but not the Excel application.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,914
Messages
6,127,690
Members
449,398
Latest member
m_a_advisoryforall

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top