Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
From a Excel workbook opened in IE, I want to use a Macro button to run VB
code to close the workbook, Quit the Application and return to IE. The code I have seems to work outside IE but not in the IE environment. Macro1() If IsEmpty(ActiveSheet.Range("c66")) Then MsgBox "Please enter Confirmation!" Exit Sub End If Dim sPath As String sPath = "\\J:\html\Content\Direct\Manu\MAN_LOGISTICS_IPT\q ms mk2\BaaNFormSub\" On Error Resume Next ActiveWorkbook.Saveas sPath & ActiveSheet.Range("c4").Value If Err.Number < 0 Then MsgBox "File not saved!" & vbLf & "contact 65128" Err.Clear End If For Each w In Application.Workbooks w.Close Next w Application.Quit End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can not open excel files without open application | Excel Discussion (Misc queries) | |||
Displaying MS Excel Chart control in ASP.NET Application | Charts and Charting in Excel | |||
Excel Caused Error in VBE6.dll. Excel will Close | New Users to Excel | |||
Excel application as an ERP platform for medium size production plan | Excel Discussion (Misc queries) | |||
Why does spelling check close Excel when checking spanish? | Excel Discussion (Misc queries) |