Opening workbook in IE not in a seperate instance

cricketsoda

New Member
Joined
Dec 8, 2016
Messages
1
Hello All,
So I am working on a script that goes to a URL, clicks export, and then opens the workbook. When I do this the new workbook always opens in a new instance of Excel so I can't use VBA to get the data I need form the new opened workbook. Is there any way to force IE to open the workbook in the same instance as my VBA code? Sorry I'm new at this but this is the code I use to open the workbook.

Code:
    Dim sNext As String
    Dim count, c As Integer
    Dim ie As SHDocVw.InternetExplorer
    Dim webURL As Variant
    
    Set ie = CreateObject("InternetExplorer.Application")
    ie.Visible = True
    Sheets("Confirm Data").Select
    ie.Navigate2 Range("G2").Value
    Dim HWNDSrc As Long
    HWNDSrc = ie.HWND
    
    Do Until ie.Busy = False: DoEvents: Loop
    Do Until ie.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop
    Do Until ie.Busy = False: DoEvents: Loop
    Do Until ie.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop

    'Click Export Button
    Set ElementCol = ie.Document.getElementsByName("Export to Excel")
    ElementCol.Item(0).Click
    
   
    Application.Wait (Now + TimeValue("0:00:05"))
    SetForegroundWindow HWNDSrc
    Application.SendKeys "%o", True
    Application.Wait (Now + TimeValue("0:00:05"))
    ie.Quit

Please let me know if I can provide any other details and thank you for your help!
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I don't believe it's possible to get IE to open the new workbook in the same instance... That being said, ForEachLoop posted this to get the name of each book & sheet name of all instances of Excel. With some work, you could modify it to target the desired workbook/worksheet to resume your code.

Code:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;">[COLOR=#101094]Declare[/COLOR][COLOR=#101094]Function[/COLOR][COLOR=#303336] FindWindowEx [/COLOR][COLOR=#101094]Lib[/COLOR][COLOR=#7D2727]"User32"[/COLOR][COLOR=#101094]Alias[/COLOR][COLOR=#7D2727]"FindWindowExA"[/COLOR][COLOR=#303336]([/COLOR][COLOR=#101094]ByVal[/COLOR][COLOR=#303336] hWnd1 [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336],[/COLOR][COLOR=#101094]ByVal[/COLOR][COLOR=#303336] hWnd2 [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336],[/COLOR][COLOR=#101094]ByVal[/COLOR][COLOR=#303336] lpsz1 [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]String[/COLOR][COLOR=#303336],[/COLOR][COLOR=#101094]ByVal[/COLOR][COLOR=#303336] lpsz2 [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]String[/COLOR][COLOR=#303336])[/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]Declare[/COLOR][COLOR=#101094]Function[/COLOR][COLOR=#303336] GetClassName [/COLOR][COLOR=#101094]Lib[/COLOR][COLOR=#7D2727]"User32"[/COLOR][COLOR=#101094]Alias[/COLOR][COLOR=#7D2727]"GetClassNameA"[/COLOR][COLOR=#303336]([/COLOR][COLOR=#101094]ByVal[/COLOR][COLOR=#303336] hWnd [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336],[/COLOR][COLOR=#101094]ByVal[/COLOR][COLOR=#303336] lpClassName [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]String[/COLOR][COLOR=#303336],[/COLOR][COLOR=#101094]ByVal[/COLOR][COLOR=#303336] nMaxCount [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336])[/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]Declare[/COLOR][COLOR=#101094]Function[/COLOR][COLOR=#303336] IIDFromString [/COLOR][COLOR=#101094]Lib[/COLOR][COLOR=#7D2727]"ole32"[/COLOR][COLOR=#303336]([/COLOR][COLOR=#101094]ByVal[/COLOR][COLOR=#303336] lpsz [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336],[/COLOR][COLOR=#101094]ByRef[/COLOR][COLOR=#303336] lpiid [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#303336] UUID[/COLOR][COLOR=#303336])[/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]Declare[/COLOR][COLOR=#101094]Function[/COLOR][COLOR=#303336] AccessibleObjectFromWindow [/COLOR][COLOR=#101094]Lib[/COLOR][COLOR=#7D2727]"oleacc"[/COLOR][COLOR=#303336]([/COLOR][COLOR=#101094]ByVal[/COLOR][COLOR=#303336] hWnd [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336],[/COLOR][COLOR=#101094]ByVal[/COLOR][COLOR=#303336] dwId [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336],[/COLOR][COLOR=#101094]ByRef[/COLOR][COLOR=#303336] riid [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#303336] UUID[/COLOR][COLOR=#303336],[/COLOR][COLOR=#101094]ByRef[/COLOR][COLOR=#303336] ppvObject [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Object[/COLOR][COLOR=#303336])[/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336]

Type UUID [/COLOR][COLOR=#858C93]'GUID[/COLOR][COLOR=#303336]
  Data1 [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336]
  Data2 [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Integer[/COLOR][COLOR=#303336]
  Data3 [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Integer[/COLOR][COLOR=#303336]
  Data4[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]7[/COLOR][COLOR=#303336])[/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Byte[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]End[/COLOR][COLOR=#303336] Type

[/COLOR][COLOR=#858C93]'------------- Form Module --------------[/COLOR][COLOR=#303336]

[/COLOR][COLOR=#101094]Option[/COLOR][COLOR=#303336] Explicit

[/COLOR][COLOR=#101094]Const[/COLOR][COLOR=#303336] IID_IDispatch [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]String[/COLOR][COLOR=#303336]=[/COLOR][COLOR=#7D2727]"{00020400-0000-0000-C000-000000000046}"[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]Const[/COLOR][COLOR=#303336] OBJID_NATIVEOM [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336]=[/COLOR][COLOR=#7D2727]&HFFFFFFF0[/COLOR][COLOR=#303336]

[/COLOR][COLOR=#858C93]'Sub GetAllWorkbookWindowNames()[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]Sub[/COLOR][COLOR=#303336] Command1_Click[/COLOR][COLOR=#303336]()[/COLOR][COLOR=#303336]
    [/COLOR][COLOR=#101094]On[/COLOR][COLOR=#101094]Error[/COLOR][COLOR=#101094]GoTo[/COLOR][COLOR=#303336] MyErrorHandler

    [/COLOR][COLOR=#101094]Dim[/COLOR][COLOR=#303336] hWndMain [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336]
    hWndMain [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] FindWindowEx[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]0[/COLOR][COLOR=#303336]&,[/COLOR][COLOR=#7D2727]0[/COLOR][COLOR=#303336]&,[/COLOR][COLOR=#7D2727]"XLMAIN"[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] vbNullString[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]

    [/COLOR][COLOR=#101094]Do[/COLOR][COLOR=#101094]While[/COLOR][COLOR=#303336] hWndMain [/COLOR][COLOR=#303336]<>[/COLOR][COLOR=#7D2727]0[/COLOR][COLOR=#303336]
        GetWbkWindows hWndMain
        hWndMain [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] FindWindowEx[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]0[/COLOR][COLOR=#303336]&,[/COLOR][COLOR=#303336] hWndMain[/COLOR][COLOR=#303336],[/COLOR][COLOR=#7D2727]"XLMAIN"[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] vbNullString[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
    [/COLOR][COLOR=#101094]Loop[/COLOR][COLOR=#303336]

    [/COLOR][COLOR=#101094]Exit[/COLOR][COLOR=#101094]Sub[/COLOR][COLOR=#303336]

MyErrorHandler[/COLOR][COLOR=#303336]:[/COLOR][COLOR=#303336]
    MsgBox [/COLOR][COLOR=#7D2727]"GetAllWorkbookWindowNames"[/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#7D2727]"Err = "[/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] Err[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Number [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#7D2727]"Description: "[/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] Err[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Description
[/COLOR][COLOR=#101094]End[/COLOR][COLOR=#101094]Sub[/COLOR][COLOR=#303336]

[/COLOR][COLOR=#101094]Private[/COLOR][COLOR=#101094]Sub[/COLOR][COLOR=#303336] GetWbkWindows[/COLOR][COLOR=#303336]([/COLOR][COLOR=#101094]ByVal[/COLOR][COLOR=#303336] hWndMain [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
    [/COLOR][COLOR=#101094]On[/COLOR][COLOR=#101094]Error[/COLOR][COLOR=#101094]GoTo[/COLOR][COLOR=#303336] MyErrorHandler

    [/COLOR][COLOR=#101094]Dim[/COLOR][COLOR=#303336] hWndDesk [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336]
    hWndDesk [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] FindWindowEx[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]hWndMain[/COLOR][COLOR=#303336],[/COLOR][COLOR=#7D2727]0[/COLOR][COLOR=#303336]&,[/COLOR][COLOR=#7D2727]"XLDESK"[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] vbNullString[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]

    [/COLOR][COLOR=#101094]If[/COLOR][COLOR=#303336] hWndDesk [/COLOR][COLOR=#303336]<>[/COLOR][COLOR=#7D2727]0[/COLOR][COLOR=#101094]Then[/COLOR][COLOR=#303336]
        [/COLOR][COLOR=#101094]Dim[/COLOR][COLOR=#303336] hWnd [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336]
        hWnd [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] FindWindowEx[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]hWndDesk[/COLOR][COLOR=#303336],[/COLOR][COLOR=#7D2727]0[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] vbNullString[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] vbNullString[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]

        [/COLOR][COLOR=#101094]Dim[/COLOR][COLOR=#303336] strText [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]String[/COLOR][COLOR=#303336]
        [/COLOR][COLOR=#101094]Dim[/COLOR][COLOR=#303336] lngRet [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336]
        [/COLOR][COLOR=#101094]Do[/COLOR][COLOR=#101094]While[/COLOR][COLOR=#303336] hWnd [/COLOR][COLOR=#303336]<>[/COLOR][COLOR=#7D2727]0[/COLOR][COLOR=#303336]
            strText [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#101094]String[/COLOR][COLOR=#303336]$([/COLOR][COLOR=#7D2727]100[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] Chr[/COLOR][COLOR=#303336]$([/COLOR][COLOR=#7D2727]0[/COLOR][COLOR=#303336]))[/COLOR][COLOR=#303336]
            lngRet [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] GetClassName[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]hWnd[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] strText[/COLOR][COLOR=#303336],[/COLOR][COLOR=#7D2727]100[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]

            [/COLOR][COLOR=#101094]If[/COLOR][COLOR=#303336] Left[/COLOR][COLOR=#303336]$([/COLOR][COLOR=#303336]strText[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] lngRet[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]=[/COLOR][COLOR=#7D2727]"EXCEL7"[/COLOR][COLOR=#101094]Then[/COLOR][COLOR=#303336]
                GetExcelObjectFromHwnd hWnd
                [/COLOR][COLOR=#101094]Exit[/COLOR][COLOR=#101094]Sub[/COLOR][COLOR=#303336]
            [/COLOR][COLOR=#101094]End[/COLOR][COLOR=#101094]If[/COLOR][COLOR=#303336]

            hWnd [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] FindWindowEx[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]hWndDesk[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] hWnd[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] vbNullString[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] vbNullString[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
            [/COLOR][COLOR=#101094]Loop[/COLOR][COLOR=#303336]

        [/COLOR][COLOR=#101094]On[/COLOR][COLOR=#101094]Error[/COLOR][COLOR=#101094]Resume[/COLOR][COLOR=#101094]Next[/COLOR][COLOR=#303336]
    [/COLOR][COLOR=#101094]End[/COLOR][COLOR=#101094]If[/COLOR][COLOR=#303336]

    [/COLOR][COLOR=#101094]Exit[/COLOR][COLOR=#101094]Sub[/COLOR][COLOR=#303336]

MyErrorHandler[/COLOR][COLOR=#303336]:[/COLOR][COLOR=#303336]
    MsgBox [/COLOR][COLOR=#7D2727]"GetWbkWindows"[/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#7D2727]"Err = "[/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] Err[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Number [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#7D2727]"Description: "[/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] Err[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Description
[/COLOR][COLOR=#101094]End[/COLOR][COLOR=#101094]Sub[/COLOR][COLOR=#303336]

[/COLOR][COLOR=#101094]Public[/COLOR][COLOR=#101094]Function[/COLOR][COLOR=#303336] GetExcelObjectFromHwnd[/COLOR][COLOR=#303336]([/COLOR][COLOR=#101094]ByVal[/COLOR][COLOR=#303336] hWnd [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Long[/COLOR][COLOR=#303336])[/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Boolean[/COLOR][COLOR=#303336]
    [/COLOR][COLOR=#101094]On[/COLOR][COLOR=#101094]Error[/COLOR][COLOR=#101094]GoTo[/COLOR][COLOR=#303336] MyErrorHandler

    [/COLOR][COLOR=#101094]Dim[/COLOR][COLOR=#303336] fOk [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Boolean[/COLOR][COLOR=#303336]
    fOk [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#7D2727]False[/COLOR][COLOR=#303336]

    [/COLOR][COLOR=#101094]Dim[/COLOR][COLOR=#303336] iid [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#303336] UUID
    [/COLOR][COLOR=#101094]Call[/COLOR][COLOR=#303336] IIDFromString[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]StrPtr[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]IID_IDispatch[/COLOR][COLOR=#303336]),[/COLOR][COLOR=#303336] iid[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]

    [/COLOR][COLOR=#101094]Dim[/COLOR][COLOR=#303336] obj [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#101094]Object[/COLOR][COLOR=#303336]
    [/COLOR][COLOR=#101094]If[/COLOR][COLOR=#303336] AccessibleObjectFromWindow[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]hWnd[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] OBJID_NATIVEOM[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] iid[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] obj[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]=[/COLOR][COLOR=#7D2727]0[/COLOR][COLOR=#101094]Then[/COLOR][COLOR=#858C93]'S_OK[/COLOR][COLOR=#303336]
        [/COLOR][COLOR=#101094]Dim[/COLOR][COLOR=#303336] objApp [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#303336] Excel[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Application
        [/COLOR][COLOR=#101094]Set[/COLOR][COLOR=#303336] objApp [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] obj[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Application
        Debug[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Print objApp[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Workbooks[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]1[/COLOR][COLOR=#303336]).[/COLOR][COLOR=#303336]Name

        [/COLOR][COLOR=#101094]Dim[/COLOR][COLOR=#303336] myWorksheet [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#303336] Worksheet
        [/COLOR][COLOR=#101094]For[/COLOR][COLOR=#101094]Each[/COLOR][COLOR=#303336] myWorksheet [/COLOR][COLOR=#101094]In[/COLOR][COLOR=#303336] objApp[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Workbooks[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]1[/COLOR][COLOR=#303336]).[/COLOR][COLOR=#303336]Worksheets
            Debug[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Print [/COLOR][COLOR=#7D2727]"     "[/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] myWorksheet[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Name
            DoEvents
        [/COLOR][COLOR=#101094]Next[/COLOR][COLOR=#303336]

        fOk [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#7D2727]True[/COLOR][COLOR=#303336]
    [/COLOR][COLOR=#101094]End[/COLOR][COLOR=#101094]If[/COLOR][COLOR=#303336]

    GetExcelObjectFromHwnd [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] fOk

    [/COLOR][COLOR=#101094]Exit[/COLOR][COLOR=#101094]Function[/COLOR][COLOR=#303336]

MyErrorHandler[/COLOR][COLOR=#303336]:[/COLOR][COLOR=#303336]
    MsgBox [/COLOR][COLOR=#7D2727]"GetExcelObjectFromHwnd"[/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#7D2727]"Err = "[/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] Err[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Number [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#7D2727]"Description: "[/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] Err[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Description
[/COLOR][COLOR=#101094]End[/COLOR][COLOR=#101094]Function
[/COLOR]
</code>
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,665
Members
449,045
Latest member
Marcus05

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