dcsimg
Results 1 to 39 of 39

Thread: Run-time error '48' Error in loading DLL

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Run-time error '48' Error in loading DLL

    Hi all,

    this is my first post and I hope that somebody can help me. My situation is this:

    O.S.: Win 7 Enterprise SP1 64 bit
    Office 2010 Pro Plus SP2 14.0.7015.10 R01

    I'm tring to execute this macro that reads all the messages into a particular subfolder of inbox folder of Outlook, it download all the attachments into a specific folder on my system and then it opens a new excel putting into its all the information about sender, reciever, email sender, email receiver etc:

    Code:
    Sub ImportareMessaggi()
        
        Dim XL As Excel.Application
        Dim WB As Excel.Workbook
        
        Set MioOutlook = CreateObject("Outlook.Application")
        Set MioMapi = MioOutlook.GetNamespace("MAPI")
    
        Set XL = New Excel.Application
        Set WB = XL.Workbooks.Open(Sheets("Foglio1").Range("A10").Value)
        
        If Sheets("Foglio1").Range("A4").Value = "1" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderInbox)
        ElseIf Sheets("Foglio1").Range("A4").Value = "2" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderSentMail)
        ElseIf Sheets("Foglio1").Range("A4").Value = "3" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderDeletedItems)
        ElseIf Sheets("Foglio1").Range("A4").Value = "4" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderJunk)
        ElseIf Sheets("Foglio1").Range("A4").Value = "5" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderOutbox)
        End If
        If Sheets("Foglio1").Range("A2").Value = "" Then
            Set Myfolder = Defaultfolder
        Else
            Set Myfolder = Defaultfolder.Folders(Sheets("Foglio1").Range("A2").Value)
        End If
        
        'Cerca prima cella libera
        x = 0
        Do
            x = x + 1
        Loop Until WB.Sheets("Foglio1").Cells(x, 1) = ""
        
        'Imposta data/ora massima
        If WB.Sheets("Foglio1").Cells(2, 1) > "" Then
            MaxDate = CStr(WB.Sheets("Foglio1").Cells(2, 1))
            lung = Len(MaxDate)
            Pos = InStr(MaxDate, " ")
            Pos = lung - Pos + 1
            If lung = 19 Then
                MaxDate = Mid(MaxDate, 7, 4) & "/" & Mid(MaxDate, 4, 2) & "/" & Mid(MaxDate, 1, 2) & Right(MaxDate, Pos)
            Else
                MaxDate = Mid(MaxDate, 7, 4) & "/" & Mid(MaxDate, 4, 2) & "/" & Mid(MaxDate, 1, 2) & " 0" & Right(MaxDate, Pos - 1)
            End If
        Else
            MaxDate = ""
        End If
           
        On Error GoTo SaltaMail
        
        For Each obj In Myfolder.Items
            
            SrcDate = CStr(obj.ReceivedTime)
            
            lung = Len(SrcDate)
            Pos = InStr(SrcDate, " ")
            Pos = lung - Pos + 1
            If lung = 19 Then
                SrcDate = Mid(SrcDate, 7, 4) & "/" & Mid(SrcDate, 4, 2) & "/" & Mid(SrcDate, 1, 2) & Right(SrcDate, Pos)
            Else
                SrcDate = Mid(SrcDate, 7, 4) & "/" & Mid(SrcDate, 4, 2) & "/" & Mid(SrcDate, 1, 2) & " 0" & Right(SrcDate, Pos - 1)
            End If
            
            If SrcDate > MaxDate Then
                If Sheets("Foglio1").Range("A8").Value = "" Or Sheets("Foglio1").Range("A8").Value = obj.SenderEmailAddress Then
                    WB.Sheets("Foglio1").Cells(x, 1) = obj.ReceivedTime
                    WB.Sheets("Foglio1").Cells(x, 2) = obj.Subject
                    WB.Sheets("Foglio1").Cells(x, 3) = obj.Body
                    WB.Sheets("Foglio1").Cells(x, 4) = obj.To
                    WB.Sheets("Foglio1").Cells(x, 5) = obj.CC
                    WB.Sheets("Foglio1").Cells(x, 6) = obj.BCC
                    WB.Sheets("Foglio1").Cells(x, 7) = obj.ReceivedByName
                    WB.Sheets("Foglio1").Cells(x, 8) = obj.SenderName
                    WB.Sheets("Foglio1").Cells(x, 9) = obj.SenderEmailAddress
                    If obj.Attachments.Count > 0 Then
                        For i = 1 To obj.Attachments.Count
                            obj.Attachments(i).SaveAsFile (Sheets("Foglio1").Range("A6").Value & "\" & obj.Attachments(i).Filename)
                        Next
                    End If
                    x = x + 1
                End If
            End If
            
    SaltaMail:
    
        Next
        
        On Error GoTo 0
        
        WB.Close
    
    End Sub
    raised by a classic button, but when I click on button I get a popup with the message indicated into the title of this post, and the debug highlights the line in yellow.
    I have check also all the references and there aren't any dlls missed...the following are all the references:

    Visual Basic for Applications
    Microsoft Excel 14.0 Object Library
    OLE Automation
    Microsoft Outlook 14.0 Object Library

    Please, can somebody help me to resolve this problem?



    Many thanks

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,248

    Re: Run-time error '48' Error in loading DLL

    are you doing this code in excel?

    while i can see some problem in your code i can not see why a new instance of excel should not be created, i tested with a basic code to be sure

    do you really need a new instance of excel? you can just open the additionally required workbook in the same instance, should be quicker and use less resources, especially as you would currently be leaving the new instance hanging open
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Talking Re: Run-time error '48' Error in loading DLL

    Yes, exact I'm doing this code in excel...a new instance of excel is a request of my boss ..I'm agree with you that is not necessary.
    Anyway the idea is everytime that I click on the button, the second file should open and it should update itself with all the email received.

    Do you have find out any error in the code? Please, can you tell me why I obtain this error?

    Many thanks

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,248

    Re: Run-time error '48' Error in loading DLL

    i retested in office 2010 windows 10
    Code:
    Sub tinst()
    Dim xl As Excel.Application
    Set xl = New Excel.Application
    xl.Visible = True
    xl.Quit
    Set xl = Nothing
    End Sub
    ran without error, opened a new instance of excel, i had a break point before quit, so i could see the new instance
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    Name:  Parameters.jpg
Views: 72
Size:  51.7 KB

    unfortunately I can't attach my xml file, but I attached a screenshoot of the xml that contains the button.
    I've try your code and on my machine ran without error, but your code is differente from mine and if I add the rest of the my code I obtain the same error...
    and I don't find what's the problem...

  6. #6
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    1,820

    Re: Run-time error '48' Error in loading DLL

    Hmm, the only thing fishy then is the next line after your red line in Post#1, because if i'm reading it right you're trying to load an "xlsm"-File, which contains (probably) VBA.
    Not sure if you have Macros enabled with/without confirmation, and you run afoul on that.
    Nevermind, that the file should exist beforehand (not sure what error-message you'd get in case of not-existing-file)
    One System to rule them all, One IDE to find them,
    One Code to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    For health reasons i try to avoid reading unformatted Code

  7. #7

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    Exact ... the code of the macro that I've put in the first post is contained in a file (the screenshoot is related to this xlsm file), and when I click on the button should open another file (where the name is indicated in A10 cell) where every row of this file contains all the details (sender, receiver, subject etc ..) Into the A6 cell instead, is indicated the folder where the attachments of the email are stored.
    I have Macros enabled without confirmation.
    Last edited by robycuccu; May 15th, 2019 at 09:45 AM. Reason: Add a further indication

  8. #8
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,248

    Re: Run-time error '48' Error in loading DLL

    as the error is before trying to open the file and you are getting an error not just the code hanging as if excel is locked by a dialog or similar

    all you can do is try some of the following

    in a new workbook
    try a basic code, as i posted above, try same code on another computer, if either of those work (which it does for me), try reinstalling office or upgrading windows version

    alternatively try running your code opening the file in the same instance of word and present the options to management
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  9. #9

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    The machine where I'm running this macro/code is a work laptop, where unfortunately I can't try reinstalling office or upgrading windows version
    because all the updates of the system are scheduled.
    I've create a new Excel file and then I go into Developer menu and click on Visual Basic button and then I create a new module
    that contains your code and run it, I obtain the same error.
    Why?

  10. #10
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    1,820

    Re: Run-time error '48' Error in loading DLL

    You could try the latebound version

    Dim XL As Object
    Set XL=CreateObject("Excel.Application")

    See if the error still comes up
    One System to rule them all, One IDE to find them,
    One Code to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    For health reasons i try to avoid reading unformatted Code

  11. #11

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    Quote Originally Posted by Zvoni View Post
    You could try the latebound version

    Dim XL As Object
    Set XL=CreateObject("Excel.Application")

    See if the error still comes up
    With early binding I obtain Run-time error '48' on the line:

    Code:
    Set XL = New Excel.Application
    With late binding I obtain Run-time error '48' on the line:

    Code:
    Set WB = XL.Workbooks.Open(Sheets("Foglio1").Range("A10").Value)
    So, the error is the same but the row where the error occur is different...

  12. #12
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    1,820

    Re: Run-time error '48' Error in loading DLL

    Hmm, OK, my research turned up, that there must be a reference missing (and it doesn't has anything to do with your code per se).
    By any chance: Did you start coding this on another Computer (Different Office-Version/Bitness)?
    One System to rule them all, One IDE to find them,
    One Code to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    For health reasons i try to avoid reading unformatted Code

  13. #13

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    I tried to run your code on this machine:

    O.S.: Win 8.1 Enterprise 64 bit
    Microsoft Office 365 ProPlus

    and it is run without any problem.

    My code instead, after that I click on button keep the sheet freezed and after some minutes I obtain the message "Wait. Another application was completing an OLE action" (see the attach) Name:  Popup.jpg
Views: 64
Size:  10.1 KB.

  14. #14

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    I tried to run your code on this machine:

    O.S.: Win 8.1 Enterprise 64 bit
    Microsoft Office 365 ProPlus

    and it is run without any problem.

    My code instead, after that I click on button keep the sheet freezed and after some minutes I obtain the message "Wait. Another application was completing an OLE action" (see the attach) Name:  Popup.jpg
Views: 64
Size:  10.1 KB.[/QUOTE].
    The strange thing si that if I check into the target folder, there are all the attachment of the emails of the subfolder of outlook, but the other excel file doesn't updated with a new row with the data of the email read.

    Moreover, I tried to run your code on this machine:


    O.S.: Win 10 Home 64 bit
    Microsoft Office Pro Plus 2016

    and also on this machine it is run without any problem.
    My code instead, indicate me that Microsoft Outlook 16.0 Object Library is missed and that there's any other version. I've tried also with late binding but at this row:

    Set MioOutlook = CreateObject("Outlook.Application")

    I obtain the message "Run-time error '429': the ActiveX component can't enable to create the object.
    Last edited by robycuccu; May 16th, 2019 at 12:45 PM.

  15. #15
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    1,820

    Re: Run-time error '48' Error in loading DLL

    And that's probably the Problem. You create a Macro on Machine 1 (with Office Version 2), and then you try to run it on Machine 2 (with Office Version 1). Kaboom
    One System to rule them all, One IDE to find them,
    One Code to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    For health reasons i try to avoid reading unformatted Code

  16. #16

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    What's between these versions:

    Office 2010 Pro Plus SP2 14.0.7015.10 R01
    Microsoft Office 365 ProPlus
    Microsoft Office Pro Plus 2016

    Machine 1 and Machine 2?

    In all these tests I've always follow the procedure:

    I've create a new Excel file and then I go into Developer menu and click on Visual Basic button and then I create a new module pasting or your code or mine.

    So there ins't a solution for this problem?

  17. #17
    Frenzied Member jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    1,364

    Re: Run-time error '48' Error in loading DLL

    Microsoft Office has 2003, 2007, 2010, 2013, 2016, and 2019 versions, so Office 2010 is different than 2016.

    Office 365 could actually be Office 2013, 2016, or 2019.

    The solution is to use late binding to avoid the issue.

  18. #18

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    In my case under Office 365 should be Office 2013...I have already use late binding and I obtained the message that I have report in the post #11

  19. #19
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,248

    Re: Run-time error '48' Error in loading DLL

    Microsoft Office has 2003, 2007, 2010, 2013, 2016, and 2019 versions, so Office 2010 is different than 2016.
    the reference is always correct with what he is doing
    I've create a new Excel file and then I go into Developer menu and click on Visual Basic button and then I create a new module pasting or your code or mine.
    i would generally always use late binding, but in this case it should not matter

    there is obviously a problem with the particular machine, apply for a replacement to be able to complete the task

    from http://support.legacyfamilytree.com/...ading-DLL.html
    Error 48: This error means one of the installation files is missing or the system registry has been corrupted. There is more than one trigger for this error. Here are the most common ones: The DLL or referenced DLL is not in a directory specified in the path.
    a quick google on excel error 48 bought up many hits, including suggestions to repair you excel installation

    edit: unlike excel, outlook needs to be running for createobject to work
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  20. #20

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    I've tried to use late binding and now I obtain this error:

    Run-time error '5':

    Invalid procedure call or argument


    Code:
    Sub bottone()
        'Dim XL As Excel.Application
        'Dim WB As Excel.Workbook
        Dim XL As Object
        Dim WB As Object
        
        Set MioOutlook = CreateObject("Outlook.Application")
        Set MioMapi = MioOutlook.GetNamespace("MAPI")
    
        'Set XL = New Excel.Application
        Set XL = CreateObject("Excel.Application")
        Set WB = XL.Workbooks.Open(Sheets("Sheet1").Range("A10").Value)
        
        
        If Sheets("Sheet1").Range("A4").Value = "1" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderInbox)
        ElseIf Sheets("Sheet1").Range("A4").Value = "2" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderSentMail)
        ElseIf Sheets("Sheet1").Range("A4").Value = "3" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderDeletedItems)
        ElseIf Sheets("Sheet1").Range("A4").Value = "4" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderJunk)
        ElseIf Sheets("Sheet1").Range("A4").Value = "5" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderOutbox)
        End If
        If Sheets("Sheet1").Range("A2").Value = "" Then
            Set Myfolder = Defaultfolder
        Else
            Set Myfolder = Defaultfolder.Folders(Sheets("Sheet1").Range("A2").Value)
        End If
        
        'Cerca prima cella libera
        x = 0
        Do
            x = x + 1
        Loop Until WB.Sheets("Sheet1").Cells(x, 1) = ""
        
        'Imposta data/ora massima
        If WB.Sheets("Sheet1").Cells(2, 1) > "" Then
            MaxDate = CStr(WB.Sheets("Sheet1").Cells(2, 1))
            lung = Len(MaxDate)
            Pos = InStr(MaxDate, " ")
            Pos = lung - Pos + 1
            If lung = 19 Then
                MaxDate = Mid(MaxDate, 7, 4) & "/" & Mid(MaxDate, 4, 2) & "/" & Mid(MaxDate, 1, 2) & Right(MaxDate, Pos)
            Else
                MaxDate = Mid(MaxDate, 7, 4) & "/" & Mid(MaxDate, 4, 2) & "/" & Mid(MaxDate, 1, 2) & " 0" & Right(MaxDate, Pos - 1)
            End If
        Else
            MaxDate = ""
        End If
           
        On Error GoTo SaltaMail
        
        For Each obj In Myfolder.Items
            
            SrcDate = CStr(obj.ReceivedTime)
            
            lung = Len(SrcDate)
            Pos = InStr(SrcDate, " ")
            Pos = lung - Pos + 1
            If lung = 19 Then
                SrcDate = Mid(SrcDate, 7, 4) & "/" & Mid(SrcDate, 4, 2) & "/" & Mid(SrcDate, 1, 2) & Right(SrcDate, Pos)
            Else
                SrcDate = Mid(SrcDate, 7, 4) & "/" & Mid(SrcDate, 4, 2) & "/" & Mid(SrcDate, 1, 2) & " 0" & Right(SrcDate, Pos - 1)
            End If
            
            If SrcDate > MaxDate Then
                If Sheets("Sheet1").Range("A8").Value = "" Or Sheets("Sheet1").Range("A8").Value = obj.SenderEmailAddress Then
                    WB.Sheets("Sheet1").Cells(x, 1) = obj.ReceivedTime
                    WB.Sheets("Sheet1").Cells(x, 2) = obj.Subject
                    WB.Sheets("Sheet1").Cells(x, 3) = obj.Body
                    WB.Sheets("Sheet1").Cells(x, 4) = obj.To
                    WB.Sheets("Sheet1").Cells(x, 5) = obj.CC
                    WB.Sheets("Sheet1").Cells(x, 6) = obj.BCC
                    WB.Sheets("Sheet1").Cells(x, 7) = obj.ReceivedByName
                    WB.Sheets("Sheet1").Cells(x, 8) = obj.SenderName
                    WB.Sheets("Sheet1").Cells(x, 9) = obj.SenderEmailAddress
                    If obj.Attachments.Count > 0 Then
                        For i = 1 To obj.Attachments.Count
                            obj.Attachments(i).SaveAsFile (Sheets("Sheet1").Range("A6").Value & "\" & obj.Attachments(i).Filename)
                        Next
                    End If
                    x = x + 1
                End If
            End If
            
    SaltaMail:
    
        Next
        
        On Error GoTo 0
        
        WB.Close
    
    End Sub
    Actually with late binding the error is moving toward, but why I obtain this new error? The code (a part the declaration of some variables with late binding) is the same...
    Last edited by robycuccu; May 17th, 2019 at 01:19 AM.

  21. #21
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,248

    Re: Run-time error '48' Error in loading DLL

    you should check if the outlook constant (olfolderinbox) has any value in the current context should be = 6

    this will of course also appy to any other outlook constants

    can you really read that yellow text?
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  22. #22
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,436

    Re: Run-time error '48' Error in loading DLL

    You are referring to a Sheets object which has not been declared.
    Code:
    Sub bottone()
        'Dim XL As Excel.Application
        'Dim WB As Excel.Workbook
        Dim XL As Object
        Dim WB As Object
        
        Set MioOutlook = CreateObject("Outlook.Application")
        Set MioMapi = MioOutlook.GetNamespace("MAPI")
    
        'Set XL = New Excel.Application
        Set XL = CreateObject("Excel.Application")
        Set WB = XL.Workbooks.Open(Sheets("Sheet1").Range("A10").Value)
        
        
        If Sheets("Sheet1").Range("A4").Value = "1" Then
    Just use WB.Sheets() like in the rest of your code

  23. #23
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,248

    Re: Run-time error '48' Error in loading DLL

    Sheets object which has not been declared
    i would guess that sheet1 is in the workbook containing the code, rather than the workbook that was opened, while i believe it would be better use a more fully qualified range, it should still work correctly
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  24. #24

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    Quote Originally Posted by westconn1 View Post
    you should check if the outlook constant (olfolderinbox) has any value in the current context should be = 6

    this will of course also appy to any other outlook constants

    can you really read that yellow text?
    Sorry I've used the yellow text but the row not is visible...anyway the row is the follow:

    Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderInbox)

    How/Where can I found the outlook constant?

  25. #25

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    Quote Originally Posted by westconn1 View Post
    i would guess that sheet1 is in the workbook containing the code, rather than the workbook that was opened, while i believe it would be better use a more fully qualified range, it should still work correctly
    Yes exactly, the sheet1 should refer to that is in the workbook containing the code...how can I refer to sheet1 contains in the workbook containing the code correctly?

  26. #26

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    Quote Originally Posted by westconn1 View Post
    i would guess that sheet1 is in the workbook containing the code, rather than the workbook that was opened, while i believe it would be better use a more fully qualified range, it should still work correctly
    Yes exactly, the sheet1 should refer to that is in the workbook containing the code...how can I refer to sheet1 contains in the workbook containing the code correctly?

  27. #27

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    I've tried to modify the entire code in this way:

    Code:
    Sub bottone()
        'Dim XL As Excel.Application
        'Dim WB As Excel.Workbook
        Dim XL As Object
        Dim WB As Object
        Dim MioMapi As Object
        Dim Myfolder As Object
        
        Set MioOutlook = CreateObject("Outlook.Application")
        Set MioMapi = MioOutlook.GetNamespace("MAPI")
    
        'Set XL = New Excel.Application
        Set XL = CreateObject("Excel.Application")
        Set actualWB = XL.Workbooks.Open(Sheets("Sheet1").Range("A10").Value)
        
        
        If actualWB.Sheets("Sheet1").Range("A4").Value = "1" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderInbox)
        ElseIf actualWB.Sheets("Sheet1").Range("A4").Value = "2" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderSentMail)
        ElseIf actualWB.Sheets("Sheet1").Range("A4").Value = "3" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderDeletedItems)
        ElseIf actualWB.Sheets("Sheet1").Range("A4").Value = "4" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderJunk)
        ElseIf actualWB.Sheets("Sheet1").Range("A4").Value = "5" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderOutbox)
        End If
        If actualWB.Sheets("Sheet1").Range("A4").Value = "" Then
            Set Myfolder = Defaultfolder
        Else
            Set Myfolder = Defaultfolder.Folders(Sheets("Sheet1").Range("A2").Value)
        End If
        
        'Cerca prima cella libera
        x = 0
        Do
            x = x + 1
        Loop Until newWB.Sheets("Sheet1").Cells(x, 1) = ""
        
        'Imposta data/ora massima
        If newWB.Sheets("Sheet1").Cells(2, 1) > "" Then
            MaxDate = CStr(newWB.Sheets("Sheet1").Cells(2, 1))
            lung = Len(MaxDate)
            Pos = InStr(MaxDate, " ")
            Pos = lung - Pos + 1
            If lung = 19 Then
                MaxDate = Mid(MaxDate, 7, 4) & "/" & Mid(MaxDate, 4, 2) & "/" & Mid(MaxDate, 1, 2) & Right(MaxDate, Pos)
            Else
                MaxDate = Mid(MaxDate, 7, 4) & "/" & Mid(MaxDate, 4, 2) & "/" & Mid(MaxDate, 1, 2) & " 0" & Right(MaxDate, Pos - 1)
            End If
        Else
            MaxDate = ""
        End If
           
        On Error GoTo SaltaMail
        
        For Each obj In Myfolder.Items
            
            SrcDate = CStr(obj.ReceivedTime)
            
            lung = Len(SrcDate)
            Pos = InStr(SrcDate, " ")
            Pos = lung - Pos + 1
            If lung = 19 Then
                SrcDate = Mid(SrcDate, 7, 4) & "/" & Mid(SrcDate, 4, 2) & "/" & Mid(SrcDate, 1, 2) & Right(SrcDate, Pos)
            Else
                SrcDate = Mid(SrcDate, 7, 4) & "/" & Mid(SrcDate, 4, 2) & "/" & Mid(SrcDate, 1, 2) & " 0" & Right(SrcDate, Pos - 1)
            End If
            
            If SrcDate > MaxDate Then
                If actualWB.Sheets("Sheet1").Range("A8").Value = "" Or actualWB.Sheets("Sheet1").Range("A8").Value = obj.SenderEmailAddress Then
                    newWB.Sheets("Sheet1").Cells(x, 1) = obj.ReceivedTime
                    newWB.Sheets("Sheet1").Cells(x, 2) = obj.Subject
                    newWB.Sheets("Sheet1").Cells(x, 3) = obj.Body
                    newWB.Sheets("Sheet1").Cells(x, 4) = obj.To
                    newWB.Sheets("Sheet1").Cells(x, 5) = obj.CC
                    newWB.Sheets("Sheet1").Cells(x, 6) = obj.BCC
                    newWB.Sheets("Sheet1").Cells(x, 7) = obj.ReceivedByName
                    newWB.Sheets("Sheet1").Cells(x, 8) = obj.SenderName
                    newWB.Sheets("Sheet1").Cells(x, 9) = obj.SenderEmailAddress
                    If obj.Attachments.Count > 0 Then
                        For i = 1 To obj.Attachments.Count
                            obj.Attachments(i).SaveAsFile (actualWB.Sheets("Sheet1").Range("A6").Value & "\" & obj.Attachments(i).Filename)
                        Next
                    End If
                    x = x + 1
                End If
            End If
            
    SaltaMail:
    
        Next
        
        On Error GoTo 0
        
        newWB.Close
    End Sub
    Now the error is changed and it's throw by the row in red color.
    This is the new error shown:

  28. #28

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    I've tried to modify the entire code in this way:

    Code:
    Sub bottone()
        'Dim XL As Excel.Application
        'Dim WB As Excel.Workbook
        Dim XL As Object
        Dim WB As Object
        Dim MioMapi As Object
        Dim Myfolder As Object
        
        Set MioOutlook = CreateObject("Outlook.Application")
        Set MioMapi = MioOutlook.GetNamespace("MAPI")
    
        'Set XL = New Excel.Application
        Set XL = CreateObject("Excel.Application")
        Set actualWB = XL.Workbooks.Open(Sheets("Sheet1").Range("A10").Value)
        
        
        If actualWB.Sheets("Sheet1").Range("A4").Value = "1" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderInbox)
        ElseIf actualWB.Sheets("Sheet1").Range("A4").Value = "2" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderSentMail)
        ElseIf actualWB.Sheets("Sheet1").Range("A4").Value = "3" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderDeletedItems)
        ElseIf actualWB.Sheets("Sheet1").Range("A4").Value = "4" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderJunk)
        ElseIf actualWB.Sheets("Sheet1").Range("A4").Value = "5" Then
            Set Defaultfolder = MioMapi.GetDefaultFolder(olFolderOutbox)
        End If
        If actualWB.Sheets("Sheet1").Range("A4").Value = "" Then
            Set Myfolder = Defaultfolder
        Else
            Set Myfolder = Defaultfolder.Folders(Sheets("Sheet1").Range("A2").Value)
        End If
        
        'Cerca prima cella libera
        x = 0
        Do
            x = x + 1
        Loop Until newWB.Sheets("Sheet1").Cells(x, 1) = ""
        
        'Imposta data/ora massima
        If newWB.Sheets("Sheet1").Cells(2, 1) > "" Then
            MaxDate = CStr(newWB.Sheets("Sheet1").Cells(2, 1))
            lung = Len(MaxDate)
            Pos = InStr(MaxDate, " ")
            Pos = lung - Pos + 1
            If lung = 19 Then
                MaxDate = Mid(MaxDate, 7, 4) & "/" & Mid(MaxDate, 4, 2) & "/" & Mid(MaxDate, 1, 2) & Right(MaxDate, Pos)
            Else
                MaxDate = Mid(MaxDate, 7, 4) & "/" & Mid(MaxDate, 4, 2) & "/" & Mid(MaxDate, 1, 2) & " 0" & Right(MaxDate, Pos - 1)
            End If
        Else
            MaxDate = ""
        End If
           
        On Error GoTo SaltaMail
        
        For Each obj In Myfolder.Items
            
            SrcDate = CStr(obj.ReceivedTime)
            
            lung = Len(SrcDate)
            Pos = InStr(SrcDate, " ")
            Pos = lung - Pos + 1
            If lung = 19 Then
                SrcDate = Mid(SrcDate, 7, 4) & "/" & Mid(SrcDate, 4, 2) & "/" & Mid(SrcDate, 1, 2) & Right(SrcDate, Pos)
            Else
                SrcDate = Mid(SrcDate, 7, 4) & "/" & Mid(SrcDate, 4, 2) & "/" & Mid(SrcDate, 1, 2) & " 0" & Right(SrcDate, Pos - 1)
            End If
            
            If SrcDate > MaxDate Then
                If actualWB.Sheets("Sheet1").Range("A8").Value = "" Or actualWB.Sheets("Sheet1").Range("A8").Value = obj.SenderEmailAddress Then
                    newWB.Sheets("Sheet1").Cells(x, 1) = obj.ReceivedTime
                    newWB.Sheets("Sheet1").Cells(x, 2) = obj.Subject
                    newWB.Sheets("Sheet1").Cells(x, 3) = obj.Body
                    newWB.Sheets("Sheet1").Cells(x, 4) = obj.To
                    newWB.Sheets("Sheet1").Cells(x, 5) = obj.CC
                    newWB.Sheets("Sheet1").Cells(x, 6) = obj.BCC
                    newWB.Sheets("Sheet1").Cells(x, 7) = obj.ReceivedByName
                    newWB.Sheets("Sheet1").Cells(x, 8) = obj.SenderName
                    newWB.Sheets("Sheet1").Cells(x, 9) = obj.SenderEmailAddress
                    If obj.Attachments.Count > 0 Then
                        For i = 1 To obj.Attachments.Count
                            obj.Attachments(i).SaveAsFile (actualWB.Sheets("Sheet1").Range("A6").Value & "\" & obj.Attachments(i).Filename)
                        Next
                    End If
                    x = x + 1
                End If
            End If
            
    SaltaMail:
    
        Next
        
        On Error GoTo 0
        
        newWB.Close
    End Sub
    Now the error is changed and it's throw by the row in red color.
    This is the new error shown:

    Name:  Error.jpg
Views: 53
Size:  12.1 KB

  29. #29
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,436

    Re: Run-time error '48' Error in loading DLL

    You should really add "Option Explicit" as the first line in your forms, modules and classes

    Where is "actualWB" defined ?
    What is "Defaultfolder" ?
    Where did you define "newWB" ?

    You are mixing Late Bound with Early Bound so it seems.
    Otherwise you should get much more errors.

    How/Where can I found the outlook constant
    https://docs.microsoft.com/en-us/off...defaultfolders

  30. #30
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,248

    Re: Run-time error '48' Error in loading DLL

    Yes exactly, the sheet1 should refer to that is in the workbook containing the code
    the workbook containing the code is always thisworkbook, or you can set you own variable
    Code:
    if Thisworkbook.sheets("Sheet1").Range("A4").Value = "1" Then

    Sorry I've used the yellow text but the row not is visible..
    i could read it by highlighting it, or optionally quoting it, but better to use some other colour

    Now the error is changed and it's throw by the row in red color.
    this would indicate no folder was assigned to defaultfolder, your new code, it appears, is now trying to get the values from the newly opened workbook, but in any case, if the cell a4 did not contain a numeric from 1 to 5, defaultfolder would be an empty variant, if defaultfolder was dimensioned as object, it would in this case be nothing and no error would occur, but it would not help your code, just have another error further down
    not that you really need defaultfolder and myfolder

    personally i would prefer a select case to all those elseifs

    Code:
    select case thisworkbook.sheets("sheet1").range("a4")
      case 1:  ifolder = olFolderInbox ' =6
      case 2:  ifolder = olFolderSentMail ' =5
      case 3: ifolder = olFolderDeletedItems  ' =3
      case 4: ifolder = olFolderJunk  ' don't know this one
      case 5: ifolder = olFolderOutbox  '  =4
      case else: msgbox "not 1 to 5 in cell A4" :exit sub  ' invalid
    end select 
    Set Myfolder = MioMapi.GetDefaultFolder(ifolder)
    if the outlook constants do not contain any value, either declare them or use the literal values
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  31. #31

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    Code:
    Option Explicit
    
    Sub bottone()
        Dim XL As Object
        Dim WB As Object
        Dim Myfolder As Object
        Dim MioOutlook As Object
        Dim MioMapi As Object
        
        Dim olFolderInbox As Integer ' =6
        Dim olFolderSentMail As Integer ' =5
        Dim olFolderDeletedItems As Integer ' =3
        Dim olFolderJunk As Integer ' don't know this one
        Dim olFolderOutbox As Integer '  =4
        
        Dim actualWB As Object
        Dim newWB As Object
        Dim ifolder As Integer
        
        Set MioOutlook = CreateObject("Outlook.Application")
        Set MioMapi = MioOutlook.GetNamespace("MAPI")
        
        Set XL = CreateObject("Excel.Application")
        Set actualWB = XL.Workbooks.Open(Sheets("Sheet1").Range("A10").Value)
        
        
        Select Case ThisWorkbook.Sheets("sheet1").Range("A4")
          Case 1:  ifolder = olFolderInbox ' =6
          Case 2:  ifolder = olFolderSentMail ' =5
          Case 3: ifolder = olFolderDeletedItems  ' =3
          Case 4: ifolder = olFolderJunk  ' don't know this one
          Case 5: ifolder = olFolderOutbox  '  =4
          Case Else: MsgBox "not 1 to 5 in cell A4": Exit Sub  ' invalid
        End Select
        Set Myfolder = MioMapi.GetDefaultFolder(ifolder)  
        
        'Cerca prima cella libera
        Dim x As Integer
        Dim MaxDate As Integer
        Dim lung As Integer
        Dim Pos As Integer
        
        
        x = 0
        Do
            x = x + 1
        Loop Until newWB.Sheets("Sheet1").Cells(x, 1) = ""
        
        'Imposta data/ora massima
        If newWB.Sheets("Sheet1").Cells(2, 1) > "" Then
            MaxDate = CStr(newWB.Sheets("Sheet1").Cells(2, 1))
            lung = Len(MaxDate)
            Pos = InStr(MaxDate, " ")
            Pos = lung - Pos + 1
            If lung = 19 Then
                MaxDate = Mid(MaxDate, 7, 4) & "/" & Mid(MaxDate, 4, 2) & "/" & Mid(MaxDate, 1, 2) & Right(MaxDate, Pos)
            Else
                MaxDate = Mid(MaxDate, 7, 4) & "/" & Mid(MaxDate, 4, 2) & "/" & Mid(MaxDate, 1, 2) & " 0" & Right(MaxDate, Pos - 1)
            End If
        Else
            MaxDate = ""
        End If
           
        Dim obj As Object
        Dim SrcDate As Integer
        On Error GoTo SaltaMail
        
        For Each obj In Myfolder.Items
            
            SrcDate = CStr(obj.ReceivedTime)
            
            lung = Len(SrcDate)
            Pos = InStr(SrcDate, " ")
            Pos = lung - Pos + 1
            If lung = 19 Then
                SrcDate = Mid(SrcDate, 7, 4) & "/" & Mid(SrcDate, 4, 2) & "/" & Mid(SrcDate, 1, 2) & Right(SrcDate, Pos)
            Else
                SrcDate = Mid(SrcDate, 7, 4) & "/" & Mid(SrcDate, 4, 2) & "/" & Mid(SrcDate, 1, 2) & " 0" & Right(SrcDate, Pos - 1)
            End If
            
            If SrcDate > MaxDate Then
                If actualWB.Sheets("Sheet1").Range("A8").Value = "" Or actualWB.Sheets("Sheet1").Range("A8").Value = obj.SenderEmailAddress Then
                    newWB.Sheets("Sheet1").Cells(x, 1) = obj.ReceivedTime
                    newWB.Sheets("Sheet1").Cells(x, 2) = obj.Subject
                    newWB.Sheets("Sheet1").Cells(x, 3) = obj.Body
                    newWB.Sheets("Sheet1").Cells(x, 4) = obj.To
                    newWB.Sheets("Sheet1").Cells(x, 5) = obj.CC
                    newWB.Sheets("Sheet1").Cells(x, 6) = obj.BCC
                    newWB.Sheets("Sheet1").Cells(x, 7) = obj.ReceivedByName
                    newWB.Sheets("Sheet1").Cells(x, 8) = obj.SenderName
                    newWB.Sheets("Sheet1").Cells(x, 9) = obj.SenderEmailAddress
                    If obj.Attachments.Count > 0 Then
                        Dim i As Integer
                        For i = 1 To obj.Attachments.Count
                            obj.Attachments(i).SaveAsFile (actualWB.Sheets("Sheet1").Range("A6").Value & "\" & obj.Attachments(i).Filename)
                        Next
                    End If
                    x = x + 1
                End If
            End If
            
    SaltaMail:
    
        Next
        
        On Error GoTo 0
        
        newWB.Close
    
    End Sub

    I modified the code with your tips, but I obtain always the same error "Run-time error '5': Invalid procedure call or argument"

  32. #32
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,436

    Re: Run-time error '48' Error in loading DLL

    I tried a stripped version of your code
    And got the same error 5, because iFolder = 0
    When I changed iFolder to 6 the code does not raise an error

    Code:
    Sub bottone()
        Dim XL As Object
        Dim WB As Object
        Dim Myfolder As Object
        Dim MioOutlook As Object
        Dim MioMapi As Object
        
        Dim olFolderInbox As Integer ' =6
        Dim olFolderSentMail As Integer ' =5
        Dim olFolderDeletedItems As Integer ' =3
        Dim olFolderJunk As Integer ' don't know this one
        Dim olFolderOutbox As Integer '  =4
        
        Dim actualWB As Object
        Dim newWB As Object
        Dim iFolder As Integer
        
        Set MioOutlook = CreateObject("Outlook.Application")
        Set MioMapi = MioOutlook.GetNamespace("MAPI")
        
    '    Set XL = CreateObject("Excel.Application")
    '    Set actualWB = XL.Workbooks.Open(Sheets("Sheet1").Range("A10").Value)
        
    '
    '    Select Case ThisWorkbook.Sheets("sheet1").Range("A4")
    '      Case 1:  iFolder = 6 'olFolderInbox
    '      Case 2:  iFolder = 5 ' olFolderSentMail ' =5
    '      Case 3: iFolder = 3 ' olFolderDeletedItems  ' =3
    '      'Case 4: ifolder = olFolderJunk  ' don't know this one
    '      Case 5: iFolder = 4 'olFolderOutbox  '  =4
    '      Case Else: MsgBox "not 1 to 5 in cell A4": Exit Sub  ' invalid
    '    End Select
         
        ' Hard coded to 6, no error
        iFolder = 6 'olFolderInbox ' =6
        Set Myfolder = MioMapi.GetDefaultFolder(iFolder)
        
    End Sub

  33. #33

    Thread Starter
    Junior Member
    Join Date
    May 2019
    Posts
    18

    Re: Run-time error '48' Error in loading DLL

    With hard coded to 6, I got this error: Run-time error '91': Object variable or With block variable not sent, on the follow line:

    Loop Until newWB.Sheets("Sheet1").Cells(x, 1) = ""

  34. #34
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,436

    Re: Run-time error '48' Error in loading DLL

    Because it's not assigned to anything anywhere.

    And what is: thisworkbook ??

    It should be something like (untested!):
    Code:
    Set newWB = XL.WorkBooks.Add

  35. #35
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,248

    Re: Run-time error '48' Error in loading DLL

    And what is: thisworkbook ??
    thisworkbook is a built in excel object representing the workbook containing the code

    ? thisworkbook.fullname


    I modified the code with your tips, but I obtain always the same error
    did you test if the outlook constants were valid constants or empty variables, as i suggested
    you have now dimensioned them as variables, but not assigned any value to the variable
    if the constants have value you need to do nothing as they should just work correctly
    if the constants have no value then you should either assign them as constants (not variables) or use the literal values

    to test
    Code:
    debug.print olFolderInbox
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  36. #36
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,436

    Re: Run-time error '48' Error in loading DLL

    I don't know which VBA robycuccu is using.
    Excel, Word, PowerPoint or Access??

    thisworkbook is a built in excel object representing the workbook containing the code

    ? thisworkbook.fullname
    ThisWorkWork only exists in Excel VBA.
    And when using Excel, why using the below code???
    Code:
    Dim XL as Object
    
    Set XL = CreateObject("Excel.Application")

  37. #37
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,248

    Re: Run-time error '48' Error in loading DLL

    from post #2
    are you doing this code in excel?
    do you really need a new instance of excel? you can just open the additionally required workbook in the same instance,
    from post #3
    Yes, exact I'm doing this code in excel...a new instance of excel is a request of my boss ..I'm agree with you that is not necessary.
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  38. #38
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,436

    Re: Run-time error '48' Error in loading DLL

    Oke, but what a mess it becomes with all implicit references mixed with explicit references.

  39. #39
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,248

    Re: Run-time error '48' Error in loading DLL

    what a mess it becomes with all implicit references mixed with explicit references.
    amen to that
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width