Ssms vba function

Wander4heat

New Member
Joined
Sep 25, 2013
Messages
2
Hello --

i am learning vba currently having only created a few small applications in the past. I am creating a simple excel workbook that I would like to contain buttons that will open just open different SQL scripts using windows authentication. I am currently using SQL server 2008 and have seen the ssms function but haven't gotten it to work properly in a function. In its simplest form I have seen something like the following:

Sub function ()
ssms "path to SQL script
"
End sub

Should I use something like ssms for this process, and if so does anyone know syntax or can point me to where I can find proper syntax? Or should I try a different kind of approach.

thank you in advance,
wander</path>
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,223,248
Messages
6,171,027
Members
452,374
Latest member
keccles

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