Page 21 of 57 FirstFirst ... 11192021222331 ... LastLast
Results 201 to 210 of 565

Thread: Tests Copying, Pasting, API Cliipboard issues. and Rough notes on Advanced API stuff

  1. #201
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    In support of this post
    http://www.excelfox.com/forum/showth...ll=1#post12124







    Geräte-Manager Before : https://imgur.com/6IT2NC9
    Attachment 2722




    Audio Video und Game Controler 1.JPG : https://imgur.com/pxfQIX9
    Audio Video und Game Controler 2.JPG : https://imgur.com/iUPViMn
    Audioeingänge und -ausgänge 1.JPG : https://imgur.com/flkUEWD
    Audioeingänge und -ausgänge 3.JPG : https://imgur.com/qnYMTjP
    Audioeingänge und -ausgänge 2.JPG : https://imgur.com/ILJ1kBf
    Computer.JPG : https://imgur.com/NuodN0E
    Druckwarteshlange Fax.JPG : https://imgur.com/Uch955O
    Druckwarteshlange Microsoft Print to PDF.JPG : https://imgur.com/KGTW8wq
    Druckwarteshlange Microsoft XPS Document Writer.JPG : https://imgur.com/lRLmhZO
    Druckwarteshlange OneNote.JPG : https://imgur.com/bjLMcGM
    Druckwarteshlange Stammdruckwarteshlange.JPG : https://imgur.com/1Ndf2XB
    DVD CD-ROM-Laufwerke.JPG : https://imgur.com/daGiajr
    Eingabegeräte (Human Interface Decice) 1.JPG : https://imgur.com/GVQjnNv
    Eingabegeräte (Human Interface Decice) 2.JPG : https://imgur.com/Fzeu0pS
    Eingabegeräte (Human Interface Decice) 3.JPG : https://imgur.com/4TtEjHU
    Eingabegeräte (Human Interface Decice) 4.JPG : https://imgur.com/Ng3DVE3
    Eingabegeräte (Human Interface Decice) 5.JPG : https://imgur.com/wbFK11u
    Eingabegeräte (Human Interface Decice) 6.JPG : https://imgur.com/DbSdltZ
    Grafikkarten.JPG : https://imgur.com/dW6OOrI
    IDE ATA ATAPI-Controller 1.JPG : https://imgur.com/1rVKfbC
    IDE ATA ATAPI-Controller 2.JPG : https://imgur.com/2YI9jdL
    IDE ATA ATAPI-Controller 3.JPG : https://imgur.com/L6HbNp4
    IEE 1394-Hostcontroller.JPG : https://imgur.com/IwO5pbG
    Laufwerk 1.JPG : https://imgur.com/8KyZRiK
    Laufwerk 2.JPG : https://imgur.com/eDvgnMH
    Mäuse und andere Zeigegeräte.JPG : https://imgur.com/XFl9PcA
    Monitore.JPG : https://imgur.com/VAayLlT
    Netzwerkadaptor 1.JPG : https://imgur.com/2NiovPn
    Netzwerkadaptor 2.JPG : https://imgur.com/xP80QlV
    Netzwerkadaptor 3.JPG : https://imgur.com/IpFWH0x
    Netzwerkadaptor 4.JPG : https://imgur.com/8pVcZ8M
    Netzwerkadaptor 5.JPG : https://imgur.com/S3W35Z3
    Netzwerkadaptor 6.JPG : https://imgur.com/lUZDGcP
    Netzwerkadaptor 7.JPG : https://imgur.com/dBFnOFD
    Netzwerkadaptor 8.JPG : https://imgur.com/rnxwMoN
    Netzwerkadaptor 9.JPG : https://imgur.com/WQYsDDk
    Prozessoren 1.JPG : https://imgur.com/9B7pMqH
    Prozessoren 2.JPG : https://imgur.com/mvfLvOG
    Softwaregeräte 1.JPG : https://imgur.com/us8XDDQ
    Softwaregeräte 2.JPG : https://imgur.com/q15BRkP
    Softwaregeräte 3.JPG : https://imgur.com/AdDBMaz
    Softwaregeräte 4.JPG : https://imgur.com/Xswu3mW
    Softwaregeräte 5.JPG : https://imgur.com/8YiYQFL
    Softwaregeräte 6.JPG : https://imgur.com/RcxBE0o
    Softwaregeräte 7.JPG : https://imgur.com/lvXaM9Z
    Speichercontroller.JPG : https://imgur.com/IZcPqew
    Systemgeräte 1.JPG : https://imgur.com/axWbdSx
    Systemgeräte 2.JPG : https://imgur.com/wArJPoq
    Systemgeräte 3.JPG : https://imgur.com/i778VGg
    Systemgeräte 4.JPG : https://imgur.com/khBWz5F
    Systemgeräte 5.JPG : https://imgur.com/sRNIUqw
    Systemgeräte 6.JPG : https://imgur.com/gXmMoyM
    Systemgeräte 7.JPG : https://imgur.com/TzOrMQb
    Systemgeräte 8.JPG : https://imgur.com/CJecHST
    Systemgeräte 9.JPG : https://imgur.com/FwH9rrd
    Systemgeräte 10.JPG : https://imgur.com/urqGHV8
    Systemgeräte 11.JPG : https://imgur.com/Y11hbdk
    Systemgeräte 12.JPG : https://imgur.com/ULwFr7T
    Systemgeräte 13.JPG : https://imgur.com/218r0g0
    Systemgeräte 14.JPG : https://imgur.com/Nr8O15k
    Systemgeräte 15.JPG : https://imgur.com/o9sMnlQ
    Systemgeräte 16.JPG : https://imgur.com/B7PRKDp
    Systemgeräte 17.JPG : https://imgur.com/MMkwaen
    Systemgeräte 18.JPG : https://imgur.com/6gE2Afq
    Systemgeräte 19.JPG : https://imgur.com/Y7UcvGE
    Systemgeräte 20.JPG : https://imgur.com/dVtp9FW
    Systemgeräte 21.JPG : https://imgur.com/NHk0epf
    Systemgeräte 22.JPG : https://imgur.com/wUN3To1
    Systemgeräte 23.JPG : https://imgur.com/uJg3OMi
    Systemgeräte 24.JPG : https://imgur.com/9MpF7nk
    Systemgeräte 25.JPG : https://imgur.com/cZ4x8Jf
    Tastaturen.JPG : https://imgur.com/2eGpdYE
    Tragbare Geräte.JPG : https://imgur.com/sLjH1UH
    USB-Controller 1.JPG : https://imgur.com/0LtyydZ
    USB-Controller 2.JPG : https://imgur.com/ZBkmxaS
    USB-Controller 3.JPG : https://imgur.com/ToQj8d8
    USB-Controller 4.JPG : https://imgur.com/rGFUyhA
    USB-Controller 5.JPG : https://imgur.com/bSYZSOM
    USB-Controller 6.JPG : https://imgur.com/w7wk6G5
    USB-Controller 7.JPG : https://imgur.com/eGPgFxa
    USB-Controller 8.JPG : https://imgur.com/XAEXWmk
    USB-Controller 9.JPG : https://imgur.com/GV2mhmg
    USB-Controller 10.JPG : https://imgur.com/a3j29CH
    USB-Controller 11.JPG : https://imgur.com/KykO1mb


    Device Manager Before.JPG : https://imgur.com/DfI49fZ
    Geraete Manager Before.xlsm : https://app.box.com/s/sef9l9cr9df7ul7i22cno49uqcqecte0



















    wbCodesBeforeFrom cmd prompt.xlsm : https://app.box.com/s/hix9sjernnbdu9vk2oqgspg8z00t9u8j
    Attached Images Attached Images

  2. #202
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Some tests on the small codings

    Some simple test based on this modified coding:
    Code:
    Sub small_20202024_ClearOfficeClipBoard_Tests()  '  https://www.excelfox.com/forum/showthread.php/2824-Tests-Copying-pasting-Cliipboard-issues-and-otes-on-API-stuff?p=18044&viewfull=1#post18044
    
    Dim avAcc, bClipboard As Boolean, j As Long, x As Long
    Dim MyPain As String
        If CLng(Val(Application.Version)) <= 11 Then  '                   Case 11: "Excel 2003" Windows    "Excel 2004" mac
         Let MyPain = "Task Pane"
        Else
         Let MyPain = "Office Clipboard"
        End If
    Set avAcc = Application.CommandBars(MyPain)   '
    Let bClipboard = avAcc.Visible      '   bClipboard will be false if the viewer pain is not open
        If Not bClipboard Then
         avAcc.Visible = True           '   This opens the Viewer pain. The coding won't work if it is not open
         DoEvents: DoEvents
        Else
        End If
    '   coding change for Office versions at  --  Office 2016  ==
        If CLng(Val(Application.Version)) < 16 Then
    ' --For Office versions 2003 2007 2010 2013 ----------------------------------------
            For j = 1 To 4         '      J =    1  2  3  4
             AccessibleChildren avAcc, Choose(j, 0, 3, 0, 3), 1, avAcc, 1
             Debug.Print "j " & j & "     ";
             Debug.Print "0&" & " " & avAcc.accName(CLng(0));
             On Error Resume Next
             Debug.Print "   1&" & " " & avAcc.accName(CLng(1));
             Debug.Print "   2&" & " " & avAcc.accName(CLng(2));
             Debug.Print "   3&" & " " & avAcc.accName(CLng(3));
             Debug.Print "   4&" & " " & avAcc.accName(CLng(4));
             Debug.Print "   5&" & " " & avAcc.accName(CLng(5));
             Debug.Print "   6&" & " " & avAcc.accName(CLng(6));
             Debug.Print "   7&" & " " & avAcc.accName(CLng(7));
             Debug.Print "   8&" & " " & avAcc.accName(CLng(8));
             Debug.Print "   9&" & " " & avAcc.accName(CLng(9))
             On Error GoTo 0
             Debug.Print
            Next
         avAcc.accDoDefaultAction 2&  '           This seems to do the clearing   It will NOT error if viewer pain is already  Cleared                  1& for paste
    ' ----------------------------------------------------------------------------------
        Else
    ' ==For Office versions 2016 and higher ==============================================
            For j = 1 To 7      '           J =  1  2  3  4  5  6  7
             AccessibleChildren avAcc, Choose(j, 0, 3, 0, 3, 0, 3, 1), 1, avAcc, 1
             Debug.Print "j " & j & "     ";
             Debug.Print "0&" & " " & avAcc.accName(CLng(0));
             On Error Resume Next
             Debug.Print "   1&" & " " & avAcc.accName(CLng(1));
             Debug.Print "   2&" & " " & avAcc.accName(CLng(2));
             Debug.Print "   3&" & " " & avAcc.accName(CLng(3));
             Debug.Print "   4&" & " " & avAcc.accName(CLng(4));
             Debug.Print "   5&" & " " & avAcc.accName(CLng(5));
             Debug.Print "   6&" & " " & avAcc.accName(CLng(6));
             Debug.Print "   7&" & " " & avAcc.accName(CLng(7));
             Debug.Print "   8&" & " " & avAcc.accName(CLng(8));
             Debug.Print "   9&" & " " & avAcc.accName(CLng(9))
             On Error GoTo 0
             Debug.Print
            Next
         avAcc.accDoDefaultAction 0& '            This seems to do the clearing   It WILL error if viewer pain is already  Cleared
        End If ' =======================================================================
     Let Application.CommandBars(MyPain).Visible = bClipboard      '   Puts the viewer pain back as it was, open or closed
    End Sub
    
    The results for the small codings are more consistent, and there is no strange problem of different results when done in step debug mode
    Here some results for Offices 2003 2007 2010 2013
    Code:
     '  excel 2003 KB
    ' Run
    '    j 1     0& 1 von 24 - Zwischenablage
    '    j 2     0& 1 von 24 - Zwischenablage
    '    j 3     0& Zusammenstellen und Einfügen 2.0
    '    j 4     0& Zusammenstellen und Einfügen 2.0   1& Alle einfügen   2& Alle löschen   3& Klicken Sie zum Einfügen auf ein Element:   4& Zwischenablage   5& Zwischenablage   6& Um diesen Aufgabenbereich später einzublenden, wählen Sie Office-Zwischenablage aus dem Menü Bearbeiten oder drücken Sie Strg+C zwei mal.   7& Optionen
    '  debug step from VBEditor
    '    j 1     0& Zwischenablage
    '    j 2     0& Zwischenablage
    '    j 3     0& Zusammenstellen und Einfügen 2.0
    '    j 4     0& Zusammenstellen und Einfügen 2.0   1& Alle einfügen   2& Alle löschen   3& Klicken Sie zum Einfügen auf ein Element:   4& Zwischenablage   5& Zwischenablage   6& Um diesen Aufgabenbereich später einzublenden, wählen Sie Office-Zwischenablage aus dem Menü Bearbeiten oder drücken Sie Strg+C zwei mal.   7& Optionen
    
    
    
    ' =============================================================================================
    
    '  Excel 2007 KB
    '  Run
    '    j 1     0& Clipboard
    '    j 2     0& Clipboard
    '    j 3     0& Collect and Paste 2.0
    '    j 4     0& Collect and Paste 2.0   1& Paste All   2& Clear All   3& Click an item to paste:   4& Clipboard   5& Clipboard   6& Options
    '
    '  Debug step from VBEditor
    '    j 1     0& Clipboard
    '    j 2     0& Clipboard
    '    j 3     0& Collect and Paste 2.0
    '    j 4     0& Collect and Paste 2.0   1& Paste All   2& Clear All   3& Click an item to paste:   4& Clipboard   5& Clipboard   6& Options
        '
    
    
    
    
    '  ======================================================================================================000
    
    '   2010  Elfy
    '  Run
    '    j 1     0& 1 von 24 - Zwischenablage
    '    j 2     0& 1 von 24 - Zwischenablage
    '    j 3     0& Zusammenstellen und Einfügen 2.0
    '    j 4     0& Zusammenstellen und Einfügen 2.0   1& Alle einfügen   2& Alle löschen   3& Klicken Sie zum Einfügen auf ein Element:   4& Zwischenablage   5& Zwischenablage   6& Optionen
    '
    '  step debug
    '    j 1     0& Zwischenablage
    '    j 2     0& Zwischenablage
    '    j 3     0& Zusammenstellen und Einfügen 2.0
    '    j 4     0& Zusammenstellen und Einfügen 2.0   1& Alle einfügen   2& Alle löschen   3& Klicken Sie zum Einfügen auf ein Element:   4& Zwischenablage   5& Zwischenablage   6& Optionen
    
    
    '  ====================================================================================================
    
    '   2013 SerSzuD2
    '  Run
    '    j 1     0& Zwischenablage
    '    j 2     0& Zwischenablage
    '    j 3     0& Zusammenstellen und Einfügen 2.0
    '    j 4     0& Zusammenstellen und Einfügen 2.0   1& Alle einfügen   2& Alle löschen   3& Klicken Sie auf ein Element, um es einzufügen:   4& Zwischenablage   5& Zwischenablage   6& Optionen
    '
    '  step debug
    '    j 1     0& Zwischenablage
    '    j 2     0& Zwischenablage
    '    j 3     0& Zusammenstellen und Einfügen 2.0
    '    j 4     0& Zusammenstellen und Einfügen 2.0   1& Alle einfügen   2& Alle löschen   3& Klicken Sie auf ein Element, um es einzufügen:   4& Zwischenablage   5& Zwischenablage   6& Optionen
    Here the corresponding result for a Office 2016
    Code:
     ' Excel 2016 Torrox
    '  Run
    '    j 1     0& Zwischenablage
    '    j 2     0& Zwischenablage
    '    j 3     0&
    '    j 4     0&
    '    j 5     0& Zwischenablage
    '    j 6     0& Zwischenablage
    '    j 7     0& Alle löschen
    '
    '  Debug step
    '    j 1     0& Zwischenablage
    '    j 2     0& Zwischenablage
    '    j 3     0&
    '    j 4     0&
    '    j 5     0& Zwischenablage
    '    j 6     0& Zwischenablage
    '    j 7     0& Alle löschen
    Last edited by DocAElstein; 11-10-2024 at 12:08 AM.

  3. #203
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Thinking in levels
    The big and small codings work differently, but possibly we can think that they work in levels, perhaps not quite the same levels

    Trying to figure out how the magic numbers , 0, 3, 0, 3, [grey]0, 3, 1 , …… came about[/color]
    The idea in the next codings is that I let the next magic number loop, and at each loop, I do the similar Debug.Print stuff as in the last post . I will loop the magic number a lot of times number, such as up to 20, but I probably will not copy all the results is there is obviously not anything. At each loop I ill do the same x& thing 9 times
    I will go up to 8 magic numbers just to make sure I see the first 7. An initial investigation showed that there was no obvious indication , or barely, to see how the actual magic number was selected. So in these experiments, as I go to loop the next magic number, I will use the actual magic numbers for the ones before. I will need 8 macros.
    That last explanation will most likely not make it too clear. I will show below just the first 3 of the 8 macros. That may helps to make it clear what I am actually doing. In the codings I do not do the version check, since the two sets of magic numbers were/ are
    0, 3, 0, 3 for under Office 2016
    or
    0, 3, 0, 3, 0, 3, 1 for Office 2016 +
    , so I will simply go through all for all versions. So, for example, the last macro, the eighth one will be doing these numbers
    0, 3, 0, 3, 0, 3, 1, PainIndx , where PainIndx is looping from o to 20

    Here is the first macro, where we in effect have no known magic number, (yet) , and just have in the
    Choose(J, ……)
    bit , this
    Choose(J, PainIndx)
    Code:
    '  https://www.excelfox.com/forum/showthread.php/2824-Tests-Copying-pasting-Cliipboard-issues-and-otes-on-API-stuff/page20
    Sub FeelMyPains_Level_1_()  '  https://www.excelfox.com/forum/showthread.php/2824-Tests-Copying-pasting-Cliipboard-issues-and-otes-on-API-stuff?p=18056&viewfull=1#post18056
    Dim avAcc, bClipboard As Boolean, J As Long, PainIndx As Long
    Dim MyPain As String
        If CLng(Val(Application.Version)) <= 11 Then  '                   Case 11: "Excel 2003" Windows    "Excel 2004" mac
         Let MyPain = "Task Pane"
        Else
         Let MyPain = "Office Clipboard"
        End If
    Set avAcc = Application.CommandBars(MyPain)   '
    Let bClipboard = avAcc.Visible      '   bClipboard will be false if the viewer pain is not open
        If Not bClipboard Then
         avAcc.Visible = True           '   This opens the Viewer pain. The coding won't work if it is not open
         DoEvents: DoEvents
        Else
        End If
    
        For PainIndx = 0 To 20
            For J = 1 To 1      '
                 If J = 1 Then Debug.Print "J " & J & " Pain Index " & PainIndx & "    ";
            On Error Resume Next  '         J =   0 -20
             AccessibleChildren avAcc, Choose(J, PainIndx), 1, avAcc, 1
             On Error GoTo 0
                If J = 1 Then
                On Error Resume Next
                Debug.Print "0&" & " " & avAcc.accName(CLng(0));
                Debug.Print "   1&" & " " & avAcc.accName(CLng(1));
                Debug.Print "   2&" & " " & avAcc.accName(CLng(2));
                Debug.Print "   3&" & " " & avAcc.accName(CLng(3));
                Debug.Print "   4&" & " " & avAcc.accName(CLng(4));
                Debug.Print "   5&" & " " & avAcc.accName(CLng(5));
                Debug.Print "   6&" & " " & avAcc.accName(CLng(6));
                Debug.Print "   7&" & " " & avAcc.accName(CLng(7));
                Debug.Print "   8&" & " " & avAcc.accName(CLng(8));
                Debug.Print "   9&" & " " & avAcc.accName(CLng(9))
                On Error GoTo 0
                Else ' I am only experimenting with the last level, so no  Else
                End If
             Debug.Print
            Next J
         ' avAcc.accDoDefaultAction 0& '  This appears to do the clearing
        Next PainIndx
    End Sub

    The next macro will assume we chose 0 for the majic number, ( as someone smart did, but it wasn’t me) , so that Choose(J, ……)
    bit , will be this
    Choose(J, 0, PainIndx)
    Code:
    '  https://www.excelfox.com/forum/showthread.php/2824-Tests-Copying-pasting-Cliipboard-issues-and-otes-on-API-stuff/page20
    Sub FeelMyPains_Level_2_()  '  https://www.excelfox.com/forum/showthread.php/2824-Tests-Copying-pasting-Cliipboard-issues-and-otes-on-API-stuff?p=18056&viewfull=1#post18056
    Dim avAcc, bClipboard As Boolean, J As Long, PainIndx As Long
    Dim MyPain As String
        If CLng(Val(Application.Version)) <= 11 Then  '                   Case 11: "Excel 2003" Windows    "Excel 2004" mac
         Let MyPain = "Task Pane"
        Else
         Let MyPain = "Office Clipboard"
        End If
    Set avAcc = Application.CommandBars(MyPain)   '
    Let bClipboard = avAcc.Visible      '   bClipboard will be false if the viewer pain is not open
        If Not bClipboard Then
         avAcc.Visible = True           '   This opens the Viewer pain. The coding won't work if it is not open
         DoEvents: DoEvents
        Else
        End If
    
        For PainIndx = 0 To 20
            For J = 1 To 2      '
                If J = 2 Then Debug.Print "J " & J & " Pain Index " & PainIndx & "    ";
            On Error Resume Next     '     J  =  1,    2
             AccessibleChildren avAcc, Choose(J, 0, PainIndx), 1, avAcc, 1
             On Error GoTo 0
                If J = 2 Then
                On Error Resume Next
                Debug.Print "0&" & " " & avAcc.accName(CLng(0));
                Debug.Print "   1&" & " " & avAcc.accName(CLng(1));
                Debug.Print "   2&" & " " & avAcc.accName(CLng(2));
                Debug.Print "   3&" & " " & avAcc.accName(CLng(3));
                Debug.Print "   4&" & " " & avAcc.accName(CLng(4));
                Debug.Print "   5&" & " " & avAcc.accName(CLng(5));
                Debug.Print "   6&" & " " & avAcc.accName(CLng(6));
                Debug.Print "   7&" & " " & avAcc.accName(CLng(7));
                Debug.Print "   8&" & " " & avAcc.accName(CLng(8));
                Debug.Print "   9&" & " " & avAcc.accName(CLng(9))
                On Error GoTo 0
                Else ' I am only experimenting with the last level, so no  Else
                End If
                If J = 2 Then Debug.Print
            Next J
         ' avAcc.accDoDefaultAction 0& '  This appears to do the clearing
        Next PainIndx
    End Sub
    ' Sub FeelMyPains_Level_2_()

    Here is the third macro , where once again I will take the known last magic number of 3, since my results from running the previous macro don’t make it clear that it should be 3. So this, Choose(J, 0, 3, PainIndx) . is th chose bit
    Code:
    Sub FeelMyPains_Level_3_()  '  https://www.excelfox.com/forum/showthread.php/2824-Tests-Copying-pasting-Cliipboard-issues-and-otes-on-API-stuff?p=18056&viewfull=1#post18056
    Dim avAcc, bClipboard As Boolean, J As Long, PainIndx As Long
    Dim MyPain As String
        If CLng(Val(Application.Version)) <= 11 Then  '                   Case 11: "Excel 2003" Windows    "Excel 2004" mac
         Let MyPain = "Task Pane"
        Else
         Let MyPain = "Office Clipboard"
        End If
    Set avAcc = Application.CommandBars(MyPain)   '
    Let bClipboard = avAcc.Visible      '   bClipboard will be false if the viewer pain is not open
        If Not bClipboard Then
         avAcc.Visible = True           '   This opens the Viewer pain. The coding won't work if it is not open
         DoEvents: DoEvents
        Else
        End If
    
        For PainIndx = 0 To 20
            For J = 1 To 3
                 If J = 3 Then Debug.Print "J " & J & " Pain Index " & PainIndx & "    ";
            On Error Resume Next  '         J =  1, 2,   3
             AccessibleChildren avAcc, Choose(J, 0, 3, PainIndx), 1, avAcc, 1
             On Error GoTo 0
                If J = 3 Then
                On Error Resume Next
                Debug.Print "0&" & " " & avAcc.accName(CLng(0));
                Debug.Print "   1&" & " " & avAcc.accName(CLng(1));
                Debug.Print "   2&" & " " & avAcc.accName(CLng(2));
                Debug.Print "   3&" & " " & avAcc.accName(CLng(3));
                Debug.Print "   4&" & " " & avAcc.accName(CLng(4));
                Debug.Print "   5&" & " " & avAcc.accName(CLng(5));
                Debug.Print "   6&" & " " & avAcc.accName(CLng(6));
                Debug.Print "   7&" & " " & avAcc.accName(CLng(7));
                Debug.Print "   8&" & " " & avAcc.accName(CLng(8));
                Debug.Print "   9&" & " " & avAcc.accName(CLng(9))
                On Error GoTo 0
                Else ' I am only experimenting with the last level, so no  Else
                End If
                If J = 3 Then Debug.Print
            Next J
         ' avAcc.accDoDefaultAction 0& '  This appears to do the clearing
        Next PainIndx
    End Sub
    ….and so on..etc etc.. up to Sub FeelMyPains_Level_8_()




    Results, which I will probably keep adding to, in the next post
    Last edited by DocAElstein; 11-10-2024 at 02:10 AM.

  4. #204
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    "Level" 1 (Sub FeelMyPains_Level_1_() )

    Code:
     '   Excel 2003
    
    '    J 1 Pain Index 0    0& 1 von 24 - Zwischenablage
    '    J 1 Pain Index 1    0&    1& IME   2& Minimieren   3& Maximieren   4& Direkthilfe   5& Schließen
    '    J 1 Pain Index 2
    '    J 1 Pain Index 3
    '    J 1 Pain Index 4
    
    '  ===================================================================================
    
    '   Excel 2007
    
    '    J 1 Pain Index 0    0& 24 of 24 - Clipboard
    '    J 1 Pain Index 1    0&    1& IME   2& Minimieren   3& Maximieren   4& Direkthilfe   5& Schließen
    '    J 1 Pain Index 2
    '    J 1 Pain Index 3
    
    ' ===================================================================================
    
    '   Excel 2010
    
    
    ' ===================================================================================
    
    '   Excel 2013
    
    ' ==================================================================================
    
    '   Excel 2016 Torrox
    '    J 1 Pain Index 0    0& Zwischenablage
    '    J 1 Pain Index 1    0&    1& IME   2& Minimieren   3& Maximieren   4& Direkthilfe   5& Schließen
    '    J 1 Pain Index 2
    '    J 1 Pain Index 3
    
    '  =====================================================================================
    
    '   Excel 2019
    
    
    ' ===================================================================================
    
    '   Excel 2021
    
    ' ====================================================================================
    
    '   Excel  2024
    
    ' ================================================================================
    
    '  Excel  365
    
    '  ==





    "Level" 2 (Sub FeelMyPains_Level_2_() )

    Code:
     '   Excel 2003
    
    '    J 2 Pain Index 0    0& Systemmenü
    '    J 2 Pain Index 1
    '    J 2 Pain Index 2
    '    J 2 Pain Index 3
    
    '  ===================================================================================
    
    '   Excel 2007
    
    '    J 2 Pain Index 0    0& Systemmenü
    '    J 2 Pain Index 1
    '    J 2 Pain Index 2
    '    J 2 Pain Index 3
    ' ===================================================================================
    
    '   Excel 2010
    
    
    ' ===================================================================================
    
    '   Excel 2013
    
    ' ==================================================================================
    
    '   Excel 2016 Torrox
    '    J 2 Pain Index 0    0& Systemmenü
    '    J 2 Pain Index 1
    '    J 2 Pain Index 2
    '    J 2 Pain Index 3
    
    '  =====================================================================================
    
    '   Excel 2019
    
    
    ' ===================================================================================
    
    '   Excel 2021
    
    ' ====================================================================================
    
    '   Excel  2024
    
    ' ================================================================================
    
    '  Excel  365
    
    '  ==================================================================================



    "Level" 3 (Sub FeelMyPains_Level_3_() )

    Code:
     '   Excel 2003
    
    '    J 3 Pain Index 0    0& Zusammenstellen und Einfügen 2.0
    '    J 3 Pain Index 1
    '    J 3 Pain Index 2
    '    J 3 Pain Index 3
    
    '  ===================================================================================
    
    '   Excel 2007
    
    '    J 3 Pain Index 0    0& Collect and Paste 2.0
    '    J 3 Pain Index 1
    '    J 3 Pain Index 2
    '    J 3 Pain Index 3
    '    J 3 Pain Index 4
    ' ===================================================================================
    
    '   Excel 2010
    
    
    ' ===================================================================================
    
    '   Excel 2013
    
    ' ==================================================================================
    
    '   Excel 2016  Torrox
    '    J 3 Pain Index 0    0&
    '    J 3 Pain Index 1
    '    J 3 Pain Index 2
    '    J 3 Pain Index 3
    
    '  =====================================================================================
    
    '   Excel 2019
    
    
    ' ===================================================================================
    
    '   Excel 2021
    
    ' ====================================================================================
    
    '   Excel  2024
    
    ' ================================================================================
    
    '  Excel  365
    
    '  ==================================================================================



    "Level" 4 (Sub FeelMyPains_Level_4_() )

    Code:
     '   Excel 2003 KB
    '    J 4 Pain Index 0    0& Systemmenü
    '    J 4 Pain Index 1
    '    J 4 Pain Index 2
    '    J 4 Pain Index 3
    '    J 4 Pain Index 4
    
    '  ===================================================================================
    
    '   Excel 2007 KB
    
    '    J 4 Pain Index 0    0& Systemmenü
    '    J 4 Pain Index 1
    '    J 4 Pain Index 2
    '    J 4 Pain Index 3
    '    J 4 Pain Index 4
    
    
    ' ===================================================================================
    
    '   Excel 2010
    
    
    ' ===================================================================================
    
    '   Excel 2013
    
    ' ==================================================================================
    
    '   Excel 2016  Torrrox
    '    J 4 Pain Index 0    0& Systemmenü
    '    J 4 Pain Index 1
    '    J 4 Pain Index 2
    '    J 4 Pain Index 3
    '    J 4 Pain Index 4
    
    '  =====================================================================================
    
    '   Excel 2019
    
    
    ' ===================================================================================
    
    '   Excel 2021
    
    ' ====================================================================================
    
    '   Excel  2024
    
    ' ================================================================================
    
    '  Excel  365
    
    '  ==================================================================================



    "Level" 5 (Sub FeelMyPains_Level_5_() )

    Code:
     '  Sub FeelMyPains_Level_5_()
    '   Excel 2003 KB
    '    J 5 Pain Index 0
    '    J 5 Pain Index 1
    '    J 5 Pain Index 2
    '    J 5 Pain Index 3
    
    '  ===================================================================================
    
    '   Excel 2007 KB
    
    '    J 5 Pain Index 0
    '    J 5 Pain Index 1
    '    J 5 Pain Index 2
    '    J 5 Pain Index 3
    '    J 5 Pain Index 4
    
    ' ===================================================================================
    
    '   Excel 2010
    
    
    ' ===================================================================================
    
    '   Excel 2013
    
    ' ==================================================================================
    
    '   Excel 2016  Torrox
    '    J 5 Pain Index 0    0& Zwischenablage
    '    J 5 Pain Index 1
    '    J 5 Pain Index 2
    '    J 5 Pain Index 3
    '    J 5 Pain Index 4
    
    '  =====================================================================================
    
    '   Excel 2019
    
    
    ' ===================================================================================
    
    '   Excel 2021
    
    ' ====================================================================================
    
    '   Excel  2024
    
    ' ================================================================================
    
    '  Excel  365
    
    '  ==================================================================================



    "Level" 6 (Sub FeelMyPains_Level_6_() )

    Code:
     '  Sub FeelMyPains_Level_6_()
    '   Excel 2003
    '    J 6 Pain Index 0
    '    J 6 Pain Index 1
    '    J 6 Pain Index 2
    '    J 6 Pain Index 3
    
    '  ===================================================================================
    
    '   Excel 2007
    
    '    J 6 Pain Index 0
    '    J 6 Pain Index 1
    '    J 6 Pain Index 2
    '    J 6 Pain Index 3
    '    J 6 Pain Index 4
    
    ' ===================================================================================
    
    '   Excel 2010
    
    
    ' ===================================================================================
    
    '   Excel 2013
    
    ' ==================================================================================
    
    '   Excel 2016  Torrox
    '    J 6 Pain Index 0    0& Systemmenü
    '    J 6 Pain Index 1
    '    J 6 Pain Index 2
    '    J 6 Pain Index 3
    '    J 6 Pain Index 4
    
    '  =====================================================================================
    
    '   Excel 2019
    
    
    ' ===================================================================================
    
    '   Excel 2021
    
    ' ====================================================================================
    
    '   Excel  2024
    
    ' ================================================================================
    
    '  Excel  365
    
    '  ==================================================================================



    "Level" 7 (Sub FeelMyPains_Level_7_() )

    Code:
     '   Excel 2003
    '  Sub FeelMyPains_Level_7_()
    '    J 7 Pain Index 0
    '    J 7 Pain Index 1
    '    J 7 Pain Index 2
    '    J 7 Pain Index 3
    
    '  ===================================================================================
    
    '   Excel 2007
    
    '    J 7 Pain Index 0
    '    J 7 Pain Index 1
    '    J 7 Pain Index 2
    '    J 7 Pain Index 3
    '    J 7 Pain Index 4
    
    ' ===================================================================================
    
    '   Excel 2010
    
    
    ' ===================================================================================
    
    '   Excel 2013
    
    ' ==================================================================================
    
    '   Excel 2016 Torox
    '    J 7 Pain Index 0    0& Alle einfügen
    '    J 7 Pain Index 1
    '    J 7 Pain Index 2
    '    J 7 Pain Index 3
    '    J 7 Pain Index 4
    
    '  =====================================================================================
    
    '   Excel 2019
    
    
    ' ===================================================================================
    
    '   Excel 2021
    
    ' ====================================================================================
    
    '   Excel  2024
    
    ' ================================================================================
    
    '  Excel  365
    
    '  ==================================================================================




    "Level" 8 (Sub FeelMyPains_Level_8_() )

    Code:
     '  Sub FeelMyPains_Level_8_()
    '   Excel 2003  KB
    '    J 8 Pain Index 0
    '    J 8 Pain Index 1
    '    J 8 Pain Index 2
    '    J 8 Pain Index 3
    
    '  ===================================================================================
    
    '   Excel 2007
    
    '    J 8 Pain Index 0
    '    J 8 Pain Index 1
    '    J 8 Pain Index 2
    '    J 8 Pain Index 3
    ' ===================================================================================
    
    '   Excel 2010
    
    
    ' ===================================================================================
    
    '   Excel 2013
    
    ' ==================================================================================
    
    '   Excel 2016 Torrox
    
    '  =====================================================================================
    
    '   Excel 2019
    
    
    ' ===================================================================================
    
    '   Excel 2021
    
    ' ====================================================================================
    
    '   Excel  2024
    
    ' ================================================================================
    
    '  Excel  365
    
    '  ==================================================================================

    Last edited by DocAElstein; 11-11-2024 at 01:02 AM.

  5. #205
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    In support of this Post
    http://www.excelfox.com/forum/showth...ll=1#post12142





    Code:
    		
    		
    PrintQueue		
    		
    	Local Print Queue	
    	restore.ini	
    	printqueue.inf	
    		
    USB		
    		
    	Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 27C8	
    	restore.ini	
    	usbport.inf	
    	usbehci.sys	
    	usbport.sys	
    	usbohci.sys	
    	usbuhci.sys	
    	usbhub.sys	
    	usbd.sys	
    		
    	Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 27C9	
    	restore.ini	
    	usbport.inf	
    	usbehci.sys	
    	usbport.sys	
    	usbohci.sys	
    	usbuhci.sys	
    	usbhub.sys	
    	usbd.sys	
    		
    	Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 27CA	
    	restore.ini	
    	usbport.inf	
    	usbehci.sys	
    	usbport.sys	
    	usbohci.sys	
    	usbuhci.sys	
    	usbhub.sys	
    	usbd.sys	
    		
    	Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 27CB	
    	restore.ini	
    	usbport.inf	
    	usbehci.sys	
    	usbport.sys	
    	usbohci.sys	
    	usbuhci.sys	
    	usbhub.sys	
    	usbd.sys	
    		
    	Intel(R) 82801G (ICH7 Family) USB2 Enhanced Host Controller - 27CC	
    	restore.ini	
    	usbport.inf	
    	usbehci.sys	
    	usbport.sys	
    	usbohci.sys	
    	usbuhci.sys	
    	usbhub.sys	
    	usbd.sys	
    		
    	USB Root Hub	
    	restore.ini	
    	usbport.inf	
    	usbehci.sys	
    	usbport.sys	
    	usbohci.sys	
    	usbuhci.sys	
    	usbhub.sys	
    	usbd.sys	
    		
    	USB Mass Storage Device	
    	restore.ini	
    	usbstor.inf	
    	usbstor.sys	
    		
    	USB Composite Device	
    	restore.ini	
    	usb.inf	
    	usbccgp.sys	
    		
    CDROM		
    		
    	CD-ROM Drive	
    	restore.ini	
    	cdrom.inf	
    	cdrom.sys	
    		
    Computer		
    		
    	ACPI x64-based PC	
    	restore.ini	
    	hal.inf	
    		
    DiskDrive		
    		
    	Disk drive	
    	restore.ini	
    	disk.inf	
    	disk.sys	
    		
    Display		
    		
    	Intel(R) G41 Express Chipset (Microsoft Corporation - WDDM 1.1)	
    	restore.ini	
    	oem2.inf	
    	igdlh.cat	
    	igdkmd64.sys	
    	igdumd64.dll	
    	igdumd32.dll	
    	igkrng500.bin	
    	igcompkrng500.bin	
    	igfcg500m.bin	
    	iglhxs64.vp	
    	iglhxo64.vp	
    	iglhxc64.vp	
    	iglhxg64.vp	
    	iglhxa64.vp	
    	iglhxa64.cpa	
    	iglhcp64.dll	
    	iglhcp32.dll	
    	iglhsip64.dll	
    	iglhsip32.dll	
    	igd10umd32.dll	
    	igd10umd64.dll	
    		
    HDC		
    		
    	Intel(R) 82801GB-GR-GH (ICH7 Family) Serial ATA Storage Controller - 27C0	
    	restore.ini	
    	mshdc.inf	
    	storahci.sys	
    	intelide.sys	
    	storprop.dll	
    	atapi.sys	
    	ataport.sys	
    	pciidex.sys	
    	pciide.sys	
    		
    	IDE Channel	
    	restore.ini	
    	mshdc.inf	
    	storahci.sys	
    	intelide.sys	
    	storprop.dll	
    	atapi.sys	
    	ataport.sys	
    	pciidex.sys	
    	pciide.sys	
    		
    Keyboard		
    		
    	HID Keyboard Device	
    	restore.ini	
    	keyboard.inf	
    	i8042prt.sys	
    	kbdclass.sys	
    	kbdhid.sys	
    		
    MEDIA		
    		
    	High Definition Audio-Gerät	
    	restore.ini	
    	hdaudio.inf	
    	hdaudio.sys	
    		
    	Microsoft Streaming Clock Proxy	
    	restore.ini	
    	ksfilter.inf	
    		
    	Microsoft Streaming Service Proxy	
    	restore.ini	
    	ksfilter.inf	
    		
    	Microsoft Streaming Quality Manager Proxy	
    	restore.ini	
    	ksfilter.inf	
    		
    	Microsoft Streaming Tee-Sink-to-Sink Converter	
    	restore.ini	
    	ksfilter.inf	
    		
    	Microsoft Trusted Audio Drivers	
    	restore.ini	
    	wdmaudio.inf	
    	portcls.sys	
    	MsApoFxProxy.dll	
    	drmk.sys	
    	drmkaud.sys	
    	sysfxui.dll	
    	wmalfxgfxdsp.dll	
    		
    Monitor		
    		
    	Generic PnP Monitor	
    	restore.ini	
    	monitor.inf	
    	monitor.sys	
    		
    	Generic Non-PnP Monitor	
    	restore.ini	
    	monitor.inf	
    	monitor.sys	
    		
    Mouse		
    		
    	HID-compliant mouse	
    	restore.ini	
    	msmouse.inf	
    	mouclass.sys	
    	sermouse.sys	
    	mouhid.sys	
    		
    Net		
    		
    	Microsoft Kernel Debug Network Adapter	
    	restore.ini	
    	kdnic.inf	
    	kdnic.sys	
    		
    	Realtek PCIe GBE Family Controller	
    	restore.ini	
    	rt640x64.inf	
    	rt640x64.sys	
    		
    	WAN Miniport (SSTP)	
    	restore.ini	
    	netsstpa.inf	
    		
    	WAN Miniport (IKEv2)	
    	restore.ini	
    	netavpna.inf	
    		
    	WAN Miniport (L2TP)	
    	restore.ini	
    	netrasa.inf	
    		
    	WAN Miniport (PPTP)	
    	restore.ini	
    	netrasa.inf	
    		
    	WAN Miniport (PPPOE)	
    	restore.ini	
    	netrasa.inf	
    		
    	WAN Miniport (IP)	
    	restore.ini	
    	netrasa.inf	
    		
    	WAN Miniport (IPv6)	
    	restore.ini	
    	netrasa.inf	
    		
    	WAN Miniport (Network Monitor)	
    	restore.ini	
    	netrasa.inf	
    		
    Printer		
    		
    	HP LaserJet Pro 200 color MFP M275 PCL6 Class Driver	
    	restore.ini	
    	prnhpcl3.inf	
    	prnhpcl3.cat	
    		
    		amd64
    		hpcP6wn8_CA.GPD
    		hppcl6_CA-manifest.ini
    		hpcPCL6_PipelineConfig.xml
    		hpcCFGP6.GDL
    		hpcP6wn8_MA.GPD
    		hppcl6_MA-manifest.ini
    		hpcP6wn8_CB.GPD
    		hppcl6_CB-manifest.ini
    		hpcP6wn8_MB.GPD
    		hppcl6_MB-manifest.ini
    		hpcP6wn8_MA_HWCP.GPD
    		hppcl6_MA_HWCP-manifest.ini
    		hpcP6wn8_CA_OJEF.GPD
    		hppcl6_CA_OJEF-manifest.ini
    		hpcP6wn8_CB_HWCP.GPD
    		hppcl6_CB_HWCP-manifest.ini
    		hpcP6wn8_CA_HWCP.GPD
    		hppcl6_CA_HWCP-manifest.ini
    		hpc6mw81.gpd
    		hpcstw81.dll
    		hpcfltw8.dll
    		hpcfltwb.dll
    		hppcl6usbext.js
    		hppcl6usbext.xml
    		hppcl6wsdext.xml
    		
    	Brother Laser Type1 Class Driver	
    	restore.ini	
    	prnbrcl1.inf	
    	PRNBRCL1.CAT	
    	BRIBMF01.GPD	
    	BRIBMF01-PIPELINECONFIG.XML	
    	BRIBMF01-MANIFEST.INI	
    	BRIBMF02.GPD	
    	BRIBMF02-PIPELINECONFIG.XML	
    	BRIBMF02-MANIFEST.INI	
    	BRIBMF03.GPD	
    	BRIBMF03-PIPELINECONFIG.XML	
    	BRIBMF03-MANIFEST.INI	
    	BRIBMF04.GPD	
    	BRIBMF04-PIPELINECONFIG.XML	
    	BRIBMF04-MANIFEST.INI	
    	BRIBMF05.GPD	
    	BRIBMF05-PIPELINECONFIG.XML	
    	BRIBMF05-MANIFEST.INI	
    	BRIBMF05.dpb	
    	BRIBMF06.GPD	
    	BRIBMF06-PIPELINECONFIG.XML	
    	BRIBMF06-MANIFEST.INI	
    	BRIBMF06.dpb	
    	BRIBMF07.GPD	
    	BRIBMF07-PIPELINECONFIG.XML	
    	BRIBMF07-MANIFEST.INI	
    	BRIBMF07.dpb	
    	BRIBMF08.GPD	
    	BRIBMF08-PIPELINECONFIG.XML	
    	BRIBMF08-MANIFEST.INI	
    	BRIBMF08.dpb	
    	BRIBMF0C.GPD	
    	BRIBMF0C-PIPELINECONFIG.XML	
    	BRIBMF0C-MANIFEST.INI	
    	BRIBMF0D.GPD	
    	BRIBMF0D-PIPELINECONFIG.XML	
    	BRIBMF0D-MANIFEST.INI	
    	BRIBMF0E.PPD	
    	BRIBMF0E-PIPELINECONFIG.XML	
    	BRIBMF0E-MANIFEST.INI	
    	BRIBREM00.GPD	
    	BRIBMM0A.GPD	
    	BRIBMM0A-PIPELINECONFIG.XML	
    	BRIBMM0A-MANIFEST.INI	
    	BRIBMM0B.GPD	
    	BRIBMM0B-PIPELINECONFIG.XML	
    	BRIBMM0B-MANIFEST.INI	
    	BRIBMM0C.GPD	
    	BRIBMM0C-PIPELINECONFIG.XML	
    	BRIBMM0C-MANIFEST.INI	
    	BRIBMM0D.GPD	
    	BRIBMM0D-PIPELINECONFIG.XML	
    	BRIBMM0D-MANIFEST.INI	
    	BRIBME0A_200.gpd	
    	BRIBME0A_200-MANIFEST.INI	
    	BRIBME0A_200-PipelineConfig.xml	
    	BRIBME0A_300.gpd	
    	BRIBME0A_300-MANIFEST.INI	
    	BRIBME0A_300-PipelineConfig.xml	
    	BRIBRE01.gpd	
    		
    		amd64
    		BRIBEN01.DLL
    		BRIBEN02.DLL
    		BRIBEN03.DLL
    		BRIBEN04.DLL
    		BRIBEN05.DLL
    		BRIBEN06.DLL
    		BRIBEN07.DLL
    		BRIBEN08.DLL
    		BRIBEN0C.DLL
    		BRIBFRM00.DLL
    		BRIBFFM00.DLL
    		BRIBFPM00.DLL
    		BRIBFLM00.DLL
    		BRIBFTM00.DLL
    		BRIBFCM00.DLL
    		BRIBREM00.DLL
    		BRIBMM0A.DLL
    		BRIBMM0B.DLL
    		BRIBMM0C.DLL
    		BRIBFFI01.DLL
    		BRIBFRA01.DLL
    		BRIBFPR01.DLL
    		BRIBFPJ01.DLL
    		BRIBRE01.dll
    		BRIBME0A.dll
    		
    	HP OfficeJet Pro 8720 PCL-3	
    	restore.ini	
    	oem3.inf	
    	hpygid20_v4.cat	
    	hpgid20v4-PipelineConfig.xml	
    	hpgid20v4cfg.gdl	
    	hpgid20v4map.xml	
    	hpgid20v4que.xml	
    	hpgid20v4-constraints.js	
    	hpgid20v4-bidiEvent.xml	
    	hpgid20v4-bidiSPM.xml	
    	hpgid20v4-bidiWSD.xml	
    	hpgid20v4-bidiUSB.js	
    	hpgid20v4help.cab	
    	hp8720.bag	
    	hpygid20_8720-manifest.ini	
    	hpgid20v4-bidiUSB-OPA.xml	
    		
    		amd64
    		hpbxpsv420.dll
    		hpygiddrv20.dll
    		hpUIMDDialog20.dll
    		hpgid20v4PE.exe
    		hpygidres20.dll
    		hpgid20v4_symbols.gpd
    		userfors.dll
    		hpgid20v4PELib.dll
    		hpoj_8720_v4.gpd
    		
    SCSIAdapter		
    		
    	Microsoft Storage Spaces Controller	
    	restore.ini	
    	spaceport.inf	
    	spaceport.sys	
    	spacedump.sys	
    		
    System		
    		
    	Composite Bus Enumerator	
    	restore.ini	
    	compositebus.inf	
    	CompositeBus.sys	
    		
    	UMBus Root Bus Enumerator	
    	restore.ini	
    	umbus.inf	
    	umbus.sys	
    		
    	NDIS Virtual Network Adapter Enumerator	
    	restore.ini	
    	ndisvirtualbus.inf	
    		
    	Plug and Play Software Device Enumerator	
    	restore.ini	
    	swenum.inf	
    	swenum.sys	
    		
    	Remote Desktop Device Redirector Bus	
    	restore.ini	
    	rdpbus.inf	
    	rdpbus.sys	
    		
    	Microsoft ACPI-Compliant System	
    	restore.ini	
    	acpi.inf	
    	acpi.sys	
    		
    	ACPI Power Button	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	PCI Bus	
    	restore.ini	
    	pci.inf	
    	pci.sys	
    		
    	System board	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	Legacy device	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	ACPI Fixed Feature Button	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	CPU to IO Controller	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	High Definition Audio Controller	
    	restore.ini	
    	hdaudbus.inf	
    	hdaudbus.sys	
    		
    	PCI-to-PCI Bridge	
    	restore.ini	
    	pci.inf	
    	pci.sys	
    		
    	LPC Controller	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	SM Bus Controller	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	Motherboard resources	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	Programmable interrupt controller	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	Direct memory access controller	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	System timer	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	High precision event timer	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	System CMOS-real time clock	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	System speaker	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	Numeric data processor	
    	restore.ini	
    	machine.inf	
    	msisadrv.sys	
    	isapnp.sys	
    		
    	Microsoft Virtual Drive Enumerator	
    	restore.ini	
    	vdrvroot.inf	
    	vdrvroot.sys	
    		
    	Volume Manager	
    	restore.ini	
    	volmgr.inf	
    	volmgr.sys	
    		
    	Microsoft Basic Display Driver	
    	restore.ini	
    	basicdisplay.inf	
    	BasicDisplay.sys	
    		
    	Microsoft Basic Render Driver	
    	restore.ini	
    	basicrender.inf	
    	BasicRender.sys	
    		
    	Microsoft System Management BIOS Driver	
    	restore.ini	
    	mssmbios.inf	
    	mssmbios.sys	
    		
    Processor		
    		
    	Intel Processor	
    	restore.ini	
    	cpu.inf	
    	processr.sys	
    	intelppm.sys	
    	amdk8.sys	
    	amdppm.sys	
    		
    VolumeSnapshot		
    		
    	Generic volume shadow copy	
    	restore.ini	
    	volsnap.inf	
    		
    SoftwareDevice		
    		
    	Generic software device	
    	restore.ini	
    	c_swdevice.inf	
    		
    1394		
    		
    	Texas Instruments 1394 OHCI Compliant Host Controller	
    	restore.ini	
    	1394.inf	
    	1394ohci.sys	
    		
    Image		
    		
    	WSD-Scandienst	
    	restore.ini	
    	wsdscdrv.inf	
    	WSDScDrv.dll	
    		
    Volume		
    		
    	Volume	
    	restore.ini	
    	volume.inf	
    	volume.sys	
    		
    HIDClass		
    		
    	USB Input Device	
    	restore.ini	
    	input.inf	
    	hidusb.sys	
    	hidclass.sys	
    	hidparse.sys	
    		
    	HID-compliant consumer control device	
    	restore.ini	
    	hidserv.inf	
    		
    	HID-compliant system controller	
    	restore.ini	
    	input.inf	
    	hidusb.sys	
    	hidclass.sys	
    	hidparse.sys	
    		
    	HID-compliant vendor-defined device	
    	restore.ini	
    	input.inf	
    	hidusb.sys	
    	hidclass.sys	
    	hidparse.sys	
    		
    AudioEndpoint		
    		
    	Audio Endpoint	
    	restore.ini	
    	audioendpoint.inf	
    		
    WSDPrintDevice		
    		
    	WSD Print Device	
    	restore.ini	
    	wsdprint.inf	
    	wsdprint.sys	
    		
    WPD		
    		
    	WPD-Dateisystem-Volumetreiber	
    	restore.ini	
    	wpdfs.inf	
    	wpdfs.dll



    wbCodesBeforeFromDoubleDriver.xlsm : https://app.box.com/s/c5cxiz6rbv8frupedm26px4k51ybz7n0

  6. #206
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    In Support of this Post question
    2020-02-15 15:08:06 https://excelribbon.tips.net/T009046...een_Dates.html Karim K.

    Determining Differences Between Dates


    From Allen Wyatt, here https://excelribbon.tips.net/T009046...een_Dates.html

    ….. When you are programming Excel macros, you should know that dates are stored internally, within variables, as serial numbers. The serial number represents the number of days elapsed since a starting "base date," specifically since 1 January 100. This means that you can perform math with the serial numbers, if desired. You can, for instance, find the number of days between two dates by simply subtracting the dates from each other.

    If you want to get fancier in your date calculations, you can use the DateDiff function. This function allows you, for instance, to determine the number of weeks or months between two dates. In order to use the function to find this type of information, you would do as follows:


    Code:
    iNumWeeks = DateDiff("ww", dFirstDate, dSecondDate)
    iNumMonths = DateDiff("m", dFirstDate, dSecondDate)
    The first line determines the number of weeks between the two dates, and the second determines the number of months between them.
    Remember that the DateDiff function is a macro (VBA) function, not a worksheet function. Excel handles a range of dates in worksheets that begin with January 1, 1900. In VBA, however, dates can begin (as already noted) in the year 100. That means that macros can handle a much larger range of dates, including dates prior to those handled natively by Excel……………..




    Example: : User inputs "2/15/2019" in cell (C4) - The next day it shows "1 Day/s" and so on.


    The following coding must go in the worksheets code module of the worksheet of interest:
    _1 Right Click Tab _2 Select Show Code or _ 3 Double Click on worksheet in VB Editor project Explorer .JPG : https://imgur.com/1xcWkQJ , https://imgur.com/oWS0uZ4
    Attachment 2748Attachment 2749


    In first worksheet Code Module
    Code:
    Option Explicit ' https://excelribbon.tips.net/T009046_Determining_Differences_Between_Dates.html  '   https://docs.microsoft.com/de-de/office/vba/language/reference/user-interface-help/datediff-function
    Public Sub Worksheet_Change(ByVal Target As Range)
        If Target.Column = 3 Then
        Dim rngC As Range: Set rngC = Me.Range("C2:C" & (Me.UsedRange.Row + Me.UsedRange.Rows.Count - 1) & "") ' (Bottom left of Usedrange + Row count in UsedRange) - 1 will give us the last row
        Dim rngStr As Range
            For Each rngStr In rngC
                Debug.Print rngStr.Value ' From VB Editor, Hit keys  Ctrl + g  to see the immediate window
                If rngStr <> "" Then
                Dim Vl As String: Let Vl = rngStr.Value
                    If Len(Vl) < 8 Then MsgBox Prompt:=Vl & " is too short for a date": GoTo Nxt
                    If Len(Vl) - Len(Replace(Vl, "/", "")) <> 2 Then MsgBox Prompt:="Don't have 2 ""/""s in " & Vl: GoTo Nxt
                Dim Dey As String, Munf As String, Jear As String
                Dim strSplt() As String: Let strSplt() = Split(Vl, "/", 3, vbBinaryCompare) ' https://imgur.com/1xcWkQJ
                 Let Dey = strSplt(1): Munf = strSplt(0): Jear = strSplt(2)
                Dim Dte As Date, strDte As String, LngDte As Long
                 Let strDte = Format(Dey & " " & Munf & " " & Jear, "dd mmmm yyyy"): Debug.Print strDte
                 Let Dte = CDate(strDte)
                 Let strDte = Format(Dey & " " & Munf & " " & Jear, "dd" & ", " & "mmmm" & ",  " & "yyyy"): Debug.Print strDte
                 Let LngDte = CLng(Dte) ' Allen Wyatt: When you are programming Excel macros, you should know that dates are stored internally, within variables, as serial numbers. The serial number represents the number of days elapsed since a starting "base date," specifically since 1 January 100. This means that you can perform math with the serial numbers, if desired. You can, for instance, find the number of days between two dates by simply subtracting the dates from each other.
                Dim LngNow As Long: Let LngNow = CLng(Now())
                ' https://excelribbon.tips.net/T009046_Determining_Differences_Between_Dates.html  '  https://docs.microsoft.com/de-de/office/vba/language/reference/user-interface-help/datediff-function
                Dim iNumDays As Long, iNumWeeks As Long, iNumMonths As Long
                 Let iNumDays = DateDiff("d", LngDte, LngNow) ' = LngNow-LngDte
                 Let iNumWeeks = DateDiff("w", LngDte, LngNow)
                 Let iNumMonths = DateDiff("m", LngDte, LngNow)
                 Let Application.EnableEvents = False
                 Let rngStr.Offset(0, 1).Value = iNumDays & " Days,  " & iNumWeeks & " Weeks,   and " & iNumMonths & " Months."
                 Let rngStr.Offset(0, 2).Value = strDte
                 Let Application.EnableEvents = True
                Else ' case empty cell
                End If
    Nxt:    Next rngStr
        Else ' No change in column 3 ( "C" )
        End If
    
    Me.Columns.AutoFit
    End Sub
    
    Note:
    You may need to adjust the coding a bit with a +1 or -1 somewhere to get the day count output exactly as you want it


    The above macro will start automatically when you add a date into column “C” , provided it has this sort of format
    2/15/2020
    ( Month/Day/Year )



    The following additional macro, will ensure that the worksheet is updated when the workbook is opened

    Macro in ThisWorkbook code module
    Code:
    Private Sub Workbook_Open()
     Call Tabelle1.Worksheet_Change(Worksheets.Item(1).Range("C2"))
    End Sub
    The above code module and coding therein can be seen by double clicking on the ThisWorkbook code module in the VB Editor explorer:
    Double Click on ThisWorkbook in VB Editor Explorer.jpg : https://imgur.com/Kls33SD
    Attachment 2747

    Note, In order to call our macro Public Sub Worksheet_Change(ByVal Target As Range) in this way, we have changed the more typically seen , default option of Private to Public in the first macro in the worksheets code module

    Here is a typical output
    _____ Workbook: KarimKAllenWyattDateDifferences.xlsm ( Using Excel 2007 32 bit )
    Row\Col
    B
    C
    D
    E
    F
    3
    4
    2/15/2020 2 Days, 0 Weeks, and 0 Months. 15, Februar, 2020
    5
    1/15/2020 33 Days, 4 Weeks, and 1 Months. 15, Januar, 2020
    6
    6
    7
    3/12/2019 342 Days, 48 Weeks, and 11 Months. 12, März, 2019
    8
    2/16/2020 1 Days, 0 Weeks, and 0 Months. 16, Februar, 2020
    9
    z
    Worksheet: Tabelle1




    KarimKAllenWyattDateDifferences.xlsm : https://app.box.com/s/ti0n1wj62hcd2qmhcg5kiqle1sya79ux







  7. #207
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    In support of this postpost
    http://www.excelfox.com/forum/showth...ce-Excel/page8
    http://www.excelfox.com/forum/showth...age8#post12252
    ( see also here : http://www.excelfox.com/forum/showth...ll=1#post12147
    http://www.excelfox.com/forum/showth...ll=1#post12148 )



    First a "VBA" arrays type macro to count the total number of files with their extensions , then a "spreadsheet" type equivalent extended also to look at the color of the cells
    Code:
    Rem 1 Worksheets info
    Dim Ws As Worksheet: Set Ws = Me
    Dim Rng As Range: Set Rng = Ws.Range("D2:F264")
    Dim arrFiles() As Variant: Let arrFiles() = Rng.Value2
    Rem 2 File extension types
    Dim Ddl As Long, Sys As Long, Bin As Long, Cpa As Long, Vp As Long, Els As Long
    Rem 3 Looping
    Dim ClCnt As Long, RwCnt As Long
        For RwCnt = 1 To UBound(arrFiles(), 1)
            For ClCnt = 1 To UBound(arrFiles(), 2)
                If arrFiles(RwCnt, ClCnt) = "" Then
                ' Empty cell, so do nothing
                Else ' Time to look at cell value
                    If Left(arrFiles(RwCnt, ClCnt), 3) = "C:\" And InStr(4, arrFiles(RwCnt, ClCnt), ".", vbBinaryCompare) > 1 Then ' use some criteria to check we have a file path
                    ' Get the extension
                    Dim Xtn As String
                     Let Xtn = Mid(arrFiles(RwCnt, ClCnt), (InStr(4, arrFiles(RwCnt, ClCnt), ".", vbBinaryCompare) + 1))
                        Select Case Xtn
                         Case "sys", "SYS"
                          Let Sys = Sys + 1
                         Case "dll"
                          Let Ddl = Ddl + 1
                         Case "bin"
                          Let Bin = Bin + 1
                         Case "cpa"
                          Let Cpa = Cpa + 1
                         Case "vp"
                          Let Vp = Vp + 1
                         Case Else
                          Debug.Print "Case Else   " & arrFiles(RwCnt, ClCnt)
                          Let Els = Els + 1
                        End Select
                    Else ' not a file path
                    End If
                End If
            Next ClCnt
        Next RwCnt
    Rem 4 output
    
    Debug.Print "sys   " & Sys
    Debug.Print "ddl   " & Ddl
    Debug.Print "bin   " & Bin
    Debug.Print "cpa   " & Cpa
    Debug.Print "vp   " & Vp
    Debug.Print "els   " & Els
    
    End Sub
    
    
    Sub WotsANormalCellColor()
     Let Range("A1").Value = "AnyText"
     Debug.Print Range("A1").Font.Color & "   " & Range("A1").Font.ColorIndex '  we seee that   Color  for black or automatic is  0    ColorIndex  for black is 1  for automatic is   -4105
    End Sub
    
    
    
    
    ' The next code and the one  in the next post is the spreadsheet type equivalent extended also to look at the color of the cells
    Sub FileTypesHere()
    Rem 1 Worksheets info
    Dim Ws As Worksheet: Set Ws = Me
    Dim Rng As Range: Set Rng = Ws.Range("D2:F264")
    'Dim arrFiles() As Variant: Let arrFiles() = Rng.Value2
    Rem 2 File extension types
    Dim Ddl As Long, Sys As Long, Bin As Long, Cpa As Long, Vp As Long, Els As Long
    Dim Ddl2 As Long, Sys2 As Long, Bin2 As Long, Cpa2 As Long, Vp2 As Long, Els2 As Long
    Rem 3 Looping
    'Dim ClCnt As Long, RwCnt As Long
    Dim RngStr As Range ' a single cell to use as a stear element in the For Next loop
        For Each RngStr In Rng
    '    For RwCnt = 1 To UBound(arrFiles(), 1)
    '        For ClCnt = 1 To UBound(arrFiles(), 2)
                'If arrFiles(RwCnt, ClCnt) = "" Then
                If RngStr.Value = "" Then
                ' Empty cell, so do nothing
                Else ' Time to look at cell value
                    'If Left(arrFiles(RwCnt, ClCnt), 3) = "C:\" And InStr(4, arrFiles(RwCnt, ClCnt), ".", vbBinaryCompare) > 1 Then ' use some criteria to check we have a file path
                    If Left(RngStr.Value, 3) = "C:\" And InStr(4, RngStr.Value, ".", vbBinaryCompare) > 1 Then ' use some criteria to check we have a file path
                    ' Get the extension
                    Dim Xtn As String
                    'Let Xtn = Mid(arrFiles(RwCnt, ClCnt), (InStr(4, arrFiles(RwCnt, ClCnt), ".", vbBinaryCompare) + 1))
                     Let Xtn = Mid(RngStr.Value, (InStr(4, RngStr.Value, ".", vbBinaryCompare) + 1))
                        Select Case Xtn
                         Case "sys", "SYS"
                          Let Sys = Sys + 1: If RngStr.Font.Color <> 0 Then Let Sys2 = Sys2 + 1
                         Case "dll"
                          Let Ddl = Ddl + 1: If RngStr.Font.Color <> 0 Then Let Ddl2 = Ddl2 + 1
                         Case "bin"
                          Let Bin = Bin + 1:: If RngStr.Font.Color <> 0 Then Let Bin2 = Bin2 + 1
                         Case "cpa"
                          Let Cpa = Cpa + 1: If RngStr.Font.Color <> 0 Then Let Cpa2 = Cpa2 + 1
                         Case "vp"
                          Let Vp = Vp + 1: If RngStr.Font.Color <> 0 Then Let Vp2 = Vp2 + 1
                         Case Else
                          Debug.Print "Case Else   " & RngStr.Value
                          Let Els = Els + 1: If RngStr.Font.Color <> 0 Then Let Els2 = Els2 + 1
                        End Select
                    Else ' not a file path
                    End If
                End If
    '        Next ClCnt
    '    Next RwCnt
        Next RngStr
    Rem 4 output
    
    Debug.Print "sys   " & Sys & " (" & Sys2 & ")"
    Debug.Print "dll   " & Ddl & " (" & Ddl2 & ")"
    Debug.Print "bin   " & Bin & " (" & Bin2 & ")"
    Debug.Print "cpa   " & Cpa & " (" & Cpa2 & ")"
    Debug.Print "vp   " & Vp & " (" & Vp2 & ")"
    Debug.Print "els   " & Els & " (" & Els2 & ")"
    
    End Sub
    

  8. #208
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Some coding in support of this post
    http://www.excelfox.com/forum/showth...age8#post12252
    for worksheet "DDAllBefore"


    ( see also here : http://www.excelfox.com/forum/showth...ll=1#post12147
    http://www.excelfox.com/forum/showth...ll=1#post12148 )


    Code:
    Option Explicit
    Sub ColumnsE()
     Columns("E:E").SpecialCells(xlCellTypeConstants, xlTextValues + xlNumbers).Copy
     Paste Destination:=Range("E680")
    End Sub
    
    
    Sub FileTypesHere()
    Rem 1 Worksheets info
    Dim Ws As Worksheet: Set Ws = Me
    Dim Rng As Range: Set Rng = Ws.Range("F5:G670")
    'Dim arrFiles() As Variant: Let arrFiles() = Rng.Value2
    Rem 2 File extension types
    Dim Ddl As Long, Sys As Long, Bin As Long, Cpa As Long, Vp As Long, Els As Long
    Dim Inf As Long, Ini As Long, Cat As Long, Gpd As Long, Xml As Long, Gdl As Long
    Dim Ddl2 As Long, Sys2 As Long, Bin2 As Long, Cpa2 As Long, Vp2 As Long, Els2 As Long
    Dim Inf2 As Long, Ini2 As Long, Cat2 As Long, Gpd2 As Long, Xml2 As Long, Gdl2 As Long
    Dim Js As Long, Dpd As Long, Ppd As Long, Cab As Long, Bag As Long, Exe As Long
    Dim Js2 As Long, Dpd2 As Long, Ppd2 As Long, Cab2 As Long, Bag2 As Long, Exe2 As Long
    Dim Dpb As Long
    Dim Dpb2 As Long
    Rem 3 Looping
    'Dim ClCnt As Long, RwCnt As Long
    Dim RngStr As Range ' a single cell to use as a stear element in the For Next loop
        For Each RngStr In Rng
    '    For RwCnt = 1 To UBound(arrFiles(), 1)
    '        For ClCnt = 1 To UBound(arrFiles(), 2)
                'If arrFiles(RwCnt, ClCnt) = "" Then
                If RngStr.Value = "" Then
                ' Empty cell, so do nothing
                Else ' Time to look at cell value
                    'If Left(arrFiles(RwCnt, ClCnt), 3) = "C:\" And InStr(4, arrFiles(RwCnt, ClCnt), ".", vbBinaryCompare) > 1 Then ' use some criteria to check we have a file path
                    'If Left(RngStr.Value, 3) = "C:\" And InStr(4, RngStr.Value, ".", vbBinaryCompare) > 1 Then ' use some criteria to check we have a file path
                    If InStr(2, RngStr.Value, ".", vbBinaryCompare) > 1 Then  ' use some criteria to check we have a file path
                    ' Get the extension
                    Dim Xtn As String
                    'Let Xtn = Mid(arrFiles(RwCnt, ClCnt), (InStr(4, arrFiles(RwCnt, ClCnt), ".", vbBinaryCompare) + 1))
                     Let Xtn = Mid(RngStr.Value, (InStr(2, RngStr.Value, ".", vbBinaryCompare) + 1))
                        Select Case UCase(Xtn)
                         Case "SYS"
                          Let Sys = Sys + 1: If RngStr.Font.Color <> 0 Then Let Sys2 = Sys2 + 1
                         Case "DLL"
                          Let Ddl = Ddl + 1: If RngStr.Font.Color <> 0 Then Let Ddl2 = Ddl2 + 1
                         Case "BIN"
                          Let Bin = Bin + 1: If RngStr.Font.Color <> 0 Then Let Bin2 = Bin2 + 1
                         Case "CPA"
                          Let Cpa = Cpa + 1: If RngStr.Font.Color <> 0 Then Let Cpa2 = Cpa2 + 1
                         Case "VP"
                          Let Vp = Vp + 1: If RngStr.Font.Color <> 0 Then Let Vp2 = Vp2 + 1
                         ' Inf As Long, Ini As Long, Cat As Long, Gpd As Long, Xml As Long, Gdl As Long
                          Case "INF"
                          Let Inf = Inf + 1: If RngStr.Font.Color <> 0 Then Let Inf2 = Inf2 + 1
                         Case "INI"
                          Let Ini = Ini + 1: If RngStr.Font.Color <> 0 Then Let Ini2 = Ini2 + 1
                         Case "CAT"
                          Let Cat = Cat + 1: If RngStr.Font.Color <> 0 Then Let Cat2 = Cat2 + 1
                         Case "GPD"
                          Let Gpd = Gpd + 1: If RngStr.Font.Color <> 0 Then Let Gpd2 = Gpd2 + 1
                         Case "XML"
                          Let Xml = Xml + 1: If RngStr.Font.Color <> 0 Then Let Xml2 = Xml2 + 1
                         Case "GDL"
                          Let Gdl = Gdl + 1: If RngStr.Font.Color <> 0 Then Let Gdl2 = Gdl2 + 1
                         ' Js As Long, Dpd As Long, Ppd As Long, Cab As Long, Bag As Long, Exe As Long
                         Case "JS"
                          Let Js = Js + 1: If RngStr.Font.Color <> 0 Then Let Js2 = Js2 + 1
                         Case "DPD"
                          Let Dpd = Dpd + 1: If RngStr.Font.Color <> 0 Then Let Dpd2 = Dpd2 + 1
                         Case "PPD"
                          Let Ppd = Ppd + 1: If RngStr.Font.Color <> 0 Then Let Ppd2 = Ppd2 + 1
                         Case "CAB"
                          Let Cab = Cab + 1: If RngStr.Font.Color <> 0 Then Let Cab2 = Cab2 + 1
                         Case "BAG"
                          Let Bag = Bag + 1: If RngStr.Font.Color <> 0 Then Let Bag2 = Bag2 + 1
                         Case "EXE"
                          Let Exe = Exe + 1: If RngStr.Font.Color <> 0 Then Let Exe2 = Exe2 + 1
                         ' DPB
                         Case "DPB"
                          Let Dpb = Dpb + 1: If RngStr.Font.Color <> 0 Then Let Dpb2 = Dpb2 + 1
                         
                                              
                         Case Else
                          Debug.Print "Case Else   " & RngStr.Value
                          Let Els = Els + 1:: If RngStr.Font.Color <> 0 Then Let Els2 = Els2 + 1
                        End Select
                    Else ' not a file path
                    End If
                End If
    '        Next ClCnt
    '    Next RwCnt
        Next RngStr
    Rem 4 output
    
    Debug.Print "sys   " & Sys & " (" & Sys2 & ")"
    Debug.Print "dll   " & Ddl & " (" & Ddl2 & ")"
    Debug.Print "bin   " & Bin & " (" & Bin2 & ")"
    Debug.Print "cpa   " & Cpa & " (" & Cpa2 & ")"
    Debug.Print "vp   " & Vp & " (" & Vp2 & ")"
    Debug.Print "els   " & Els & " (" & Els2 & ")"
    ' Inf As Long, Ini As Long, Cat As Long, Gpd As Long, Xml As Long, Gdl As Long
    Debug.Print "inf   " & Inf & " (" & Inf2 & ")"
    Debug.Print "ini   " & Ini & " (" & Ini2 & ")"
    Debug.Print "cat   " & Cat & " (" & Cat2 & ")"
    Debug.Print "gpd   " & Gpd & " (" & Gpd2 & ")"
    Debug.Print "xml   " & Xml & " (" & Xml2 & ")"
    Debug.Print "gdl   " & Gdl & " (" & Gdl2 & ")"
    ' Js As Long, Dpd As Long, Ppd As Long, Cab As Long, Bag As Long, Exe As Long
    Debug.Print "js   " & Js & " (" & Js2 & ")"
    Debug.Print "dpd   " & Dpd & " (" & Dpd2 & ")"
    Debug.Print "cab   " & Cab & " (" & Cab2 & ")"
    Debug.Print "bag   " & Bag & " (" & Bag2 & ")"
    Debug.Print "ppd   " & Ppd & " (" & Ppd & ")"
    Debug.Print "exe   " & Exe & " (" & Exe2 & ")"
    ' DPB
    Debug.Print "dpb   " & Dpb & " (" & Dpb2 & ")"
    End Sub

  9. #209
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Some additional coding to help in this Post
    http://www.excelfox.com/forum/showth...page9post12255

    (VBA "arrays" version)
    Code:
    Option Explicit
    Private Sub FileTypesHereArrays()
    Rem 1 Worksheets info
    Dim Ws As Worksheet: Set Ws = Me
    Dim Rng As Range: Set Rng = Ws.Range("D4:E75")
    Dim arrFiles() As Variant: Let arrFiles() = Rng.Value2
    Rem 2 File extension types
    Dim Ddl As Long, Sys As Long, Bin As Long, Cpa As Long, Vp As Long, Els As Long
    Dim Bag As Long, Xml As Long, Js As Long, Gdl As Long, Cab As Long, Ini As Long, Cat As Long, Inf As Long, Pnf As Long, Gpd As Long, Exe As Long
    Rem 3 Looping
    Dim ClCnt As Long, RwCnt As Long
        For RwCnt = 1 To UBound(arrFiles(), 1)
            For ClCnt = 1 To UBound(arrFiles(), 2)
                If arrFiles(RwCnt, ClCnt) = "" Then
                ' Empty cell, so do nothing
                Else ' Time to look at cell value
    '                If Left(arrFiles(RwCnt, ClCnt), 3) = "C:\" And InStr(4, arrFiles(RwCnt, ClCnt), ".", vbBinaryCompare) > 1 Then ' use some criteria to check we have a file path
                    If InStr(2, arrFiles(RwCnt, ClCnt), ".", vbBinaryCompare) > 1 Then ' use some criteria to check we have a file path
                    ' Get the extension
                    Dim Xtn As String
                     Let Xtn = Mid(arrFiles(RwCnt, ClCnt), (InStr(2, arrFiles(RwCnt, ClCnt), ".", vbBinaryCompare) + 1))
                        Select Case UCase(Xtn)
                         Case "SYS"
                          Let Sys = Sys + 1
                         Case "DLL"
                          Let Ddl = Ddl + 1
                         Case "BIN"
                          Let Bin = Bin + 1
                         Case "CPA"
                          Let Cpa = Cpa + 1
                         Case "VP"
                          Let Vp = Vp + 1
                         'Dim Bag As Long, Xml As Long, Js As Long, Gdl As Long, Cab As Long, Ini As Long, Cat As Long
                         Case "BAG"
                          Let Bag = Bag + 1
                         Case "XML"
                          Let Xml = Xml + 1
                         Case "JS"
                          Let Js = Js + 1
                         Case "GDL"
                          Let Gdl = Gdl + 1
                         Case "CAB"
                          Let Cab = Cab + 1
                         Case "INI"
                          Let Ini = Ini + 1
                         Case "CAT"
                          Let Cat = Cat + 1
                         ' Inf As Long, Pnf As Long, Gpd As Long, Exe as long
                         Case "INF"
                          Let Inf = Inf + 1
                         Case "PNF"
                          Let Pnf = Pnf + 1
                         Case "GPD"
                          Let Gpd = Gpd + 1
                         Case "EXE"
                          Let Exe = Exe + 1
                         Case Else
                          Debug.Print "Case Else   " & arrFiles(RwCnt, ClCnt)
                          Let Els = Els + 1
                        End Select
                    Else ' not a file path
                    End If
                End If
            Next ClCnt
        Next RwCnt
    Rem 4 output
    Debug.Print "sys   " & Sys
    Debug.Print "dll   " & Ddl
    Debug.Print "bin   " & Bin
    Debug.Print "cpa   " & Cpa
    Debug.Print "vp   " & Vp
    Debug.Print "els   " & Els
    'Dim Bag As Long, Xml As Long, Js As Long, Gdl As Long, Cab As Long, Ini As Long, Cat As Long
    Debug.Print "bag   " & Bag
    Debug.Print "xml   " & Xml
    Debug.Print "js   " & Js
    Debug.Print "gdl   " & Gdl
    Debug.Print "cab   " & Cab
    Debug.Print "ini   " & Ini
    Debug.Print "cat   " & Cat
    ' Inf As Long, Pnf As Long, Gpd As Long, Exe as long
    Debug.Print "inf   " & Inf
    Debug.Print "pnf   " & Pnf
    Debug.Print "gpd   " & Gpd
    Debug.Print "exe   " & Exe
    Debug.Print "Total is  " & Sys + Ddl + Bin + Cpa + Vp + Bag + Xml + Js + Gdl + Cab + Ini + Cat + Inf + Pnf + Gpd + Exe
    End Sub

  10. #210
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    In support of this post
    http://www.excelfox.com/forum/showth...page9post12255



    Code:
    '
    Sub CompareDriverFilesCommandInDeviceManager() '                         InDoubleDriverAllList()
    Rem 0
        If ActiveSheet.Name <> "PowerShell" Then
         MsgBox prompt:="Oops": Exit Sub
        Else
        End If
    Rem 1 Worksheets info
    Dim WsDMP As Worksheet, WsCmd As Worksheet
     Set WsDMP = Worksheets("DeviceManagerProperties"): Set WsCmd = Worksheets("PowerShell")
    
    Rem 2 Looking at each cell in the selection
    ' Random number between 3 and 56 to get color index for any matching file names (1 is black, 2 is white , up to 56 is other colors:  3 to 56   is like  (0 to 53)+3  Rnd gives like  0-.99999  so (Int(Rnd*54))+3  is what we want
    Dim ClrIdx As Long
     Randomize: Let ClrIdx = (Int(Rnd * 54)) + 3
    
    Dim SrchForCel As Range
        For Each SrchForCel In Selection ' Take each cell in selected range
        Dim CelVl As String: Let CelVl = SrchForCel.Value
            'If CelVl <> "" And Left(CelVl, 3) = "C:\" And InStr(4, CelVl, ".", vbBinaryCompare) > 1 Then ' use some criteria to check we have a file path
            If CelVl <> "" And InStr(4, CelVl, ".", vbBinaryCompare) > 1 Then  ' use some criteria to check we have a file and not a Folder name with a  .  in it
                If Len(CelVl) > (InStr(4, CelVl, ".", vbBinaryCompare) + 3) Then
                ' case a lot of characters after the  .  so we probably have a Folder name
                Else
                Dim FileNmeSrchFor As String
                 Let FileNmeSrchFor = Right(CelVl, (Len(CelVl)) - (InStrRev(CelVl, "\", -1, vbBinaryCompare))) ' Determine the file name as that looking from the right as many characters as (the total character number) - (the position looking from the right of a "\")
                Rem 3 We now should have a file name, so we look for it in worksheet  DDAllBefore
                Dim SrchRng As Range: Set SrchRng = Application.Range("=DeviceManagerProperties!D2:DeviceManagerProperties!F265")    '
                Dim FndCel As Range
                 Set FndCel = SrchRng.Find(what:=FileNmeSrchFor, After:=Application.Range("=DeviceManagerProperties!D2"), LookAt:=xlPart, searchorder:=xlNext, MatchCase:=False) '
                    If Not FndCel Is Nothing Then ' the range is set, so the file string has been found in a cell in  DDAllBefore
                    Rem 4 we have two matching cells
                     'Debug.Print FndCel.Value
                    '4b) color matching file names in each worksheet, we do the unecerssary activating and selecting so we can see what is going in
                     WsCmd.Activate: SrchForCel.Select
                     'Application.Wait (Now + TimeValue("00:00:01"))
                     'Let SrchForCel.Characters(((InStrRev(CelVl, "\", -1, vbBinaryCompare)) + 1), (Len(CelVl)) - (InStrRev(CelVl, "\", -1, vbBinaryCompare))).Font.ColorIndex = ClrIdx
                     Let SrchForCel.Font.ColorIndex = ClrIdx
                     WsDMP.Activate: FndCel.Select
                     'Application.Wait (Now + TimeValue("00:00:02"))
                     Let FndCel.Font.ColorIndex = ClrIdx
                    Else ' No match was found - the thing in the cell in
                    End If
                End If ' end of check that the string with a  .  in it was a file
            Else ' case no file string in cell
            End If
        Next SrchForCel
    End Sub
    

Similar Threads

  1. Some Date Notes and Tests
    By DocAElstein in forum Test Area
    Replies: 5
    Last Post: 03-26-2025, 02:56 AM
  2. Replies: 116
    Last Post: 02-23-2025, 12:13 AM
  3. Replies: 21
    Last Post: 12-15-2024, 07:13 PM
  4. Replies: 42
    Last Post: 05-29-2023, 01:19 PM
  5. Replies: 11
    Last Post: 10-13-2013, 10:53 PM

Posting Permissions

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