FileOpen/FileSave Command doesn't work?

chadjones123

New Member
Joined
Aug 27, 2009
Messages
1
Hey!

So I am having an issue that I can not seem to figure out here... I want to be able to use my own custom dialog box when a user requests and Open or a Save (in Office 2007). I can do this via VBA and macros, but I have a shared add-in that I have created in VS2008 that does this for me. All seems to work well in Word, but not in Excel? It appears that the FileOpen/FileSave command does not get executed when the user uses the Ctrl+O/Ctrl+S hotkeys. Thus, displaying Excels open dialog instead of my own.

I even tried creating a macro to call the command as follows, but to no avail as the Excel open dialog is still displayed:

Sub FileOpen()
CommandBars.FindControl(ID:=23).Execute
End Sub


Does anyone know how I can successfully execute the FileOpen command when the user presses Ctrl+O or Ctrl+S from within the Add-in? Or perhaps a macro to call this?

Thanks,
Chad
 

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,215,694
Messages
6,126,250
Members
449,305
Latest member
Dalyb2

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