Results 1 to 10 of 935

Thread: Windows 10 and Office Excel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10


    This macro,
    http://www.excelfox.com/forum/showth...ge18#post12360
    http://www.excelfox.com/forum/showth...ll=1#post12522

    , is used again to analyse the results from above
    sys 95 (71) [41]
    dll 13 (11) [1]
    bin 6 (2) [0]
    cpa 1 (1) [0]
    vp 5 (5) [0]
    Totals 120 (90) [42]


    I get slightly different results to previously. Probably due to
    _ a) forgetting to underline already coloured that were not in DriverStore, so only in driver.
    _ b) I also screwed up the logic in the macro a bit, Because….after the change to make an underlined for a case of an already coloured, but not matched in drivers ( http://www.excelfox.com/forum/showth...ll=1#post12810 ) , The following logic, from here ( http://www.excelfox.com/forum/showth...ge18#post12360 ) , is not valid……._
    _.......the code snippet below would be a typical appropriate logic code line to achieve filling the corresponding 3 variables, if appropriate, to indicate the presence of a file type in
    __ Device Manager __ ( DriverStore ) __ [ drivers ]
    Code:
     Case "SYS"
        Let Sys = Sys + 1: If rngStr.Font.Italic = True Then Let Sys2 = Sys2 + 1: If rngStr.Font.Underline = xlUnderlineStyleSingle Then Let Sys3 = Sys3 + 1 
    An entry must be both in Device Manager and be italicised , before it is possible to be underlined. Hence the long line use is valid
    ………………._

    The simple change we need is to remove the last If from the same physical line to a separate line. While we are at it , we might as well do it for all .
    The logic then is more straight forward
    The Case case , decides to add the count for the file type… at this popint…
    If the cell is ( italicised ) , it is in DriverStore
    If the cell is [ underlined ] , it is in drivers
    Just to make it clear , this snippet shows me in the process of changing
    Sub FileTypesHereInDeviceManagerPropertiesUndDriverSto reUnddrivers()
    http://www.excelfox.com/forum/showth...ll=1#post12522
    to
    Sub FileTypesHereInDeviceManagerPropertiesUndDriverSto reUnddrivers2()

    Code:
                        Select Case UCase(Xtn)
                         Case "SYS"
                          Let Sys = Sys + 1
                          If rngStr.Font.Italic = True Then Let Sys2 = Sys2 + 1
                          If rngStr.Font.Underline = xlUnderlineStyleSingle Then Let Sys3 = Sys3 + 1
                         Case "DLL"
                          Let Ddl = Ddl + 1
                          If rngStr.Font.Italic = True Then Let Ddl2 = Ddl2 + 1
                          If rngStr.Font.Underline = xlUnderlineStyleSingle Then Let Ddl3 = Ddl3 + 1
                         Case "BIN"
                          Let Bin = Bin + 1
                          If rngStr.Font.Italic = True Then Let Bin2 = Bin2 + 1
                          If rngStr.Font.Underline = xlUnderlineStyleSingle Then Let Bin3 = Bin3 + 1
                         Case "CPA"
                          Let Cpa = Cpa + 1: If rngStr.Font.Italic = True Then Let Cpa2 = Cpa2 + 1: If rngStr.Font.Underline = xlUnderlineStyleSingle Then Let Cpa3 = Cpa3 + 1
                         Case "VP"
                          Let Vp = Vp + 1: If rngStr.Font.Italic = True Then Let Vp2 = Vp2 + 1: If rngStr.Font.Underline = xlUnderlineStyleSingle Then Let Vp3 = Vp3 + 1
                         Case Else
                          Debug.Print "Case Else   " & rngStr.Value
                          Let Els = Els + 1: If rngStr.Font.Italic = True Then Let Els2 = Els2 + 1: If rngStr.Font.Underline = xlUnderlineStyleSingle Then Let Els3 = Els3 + 1
                        End Select
                    Else ' not a file path
    Here the results from the previous and current macro
    sys 95 (71) [41]
    dll 13 (11) [1]
    bin 6 (2) [0]
    cpa 1 (1) [0]
    vp 5 (5) [0]
    Totals 120 (90) [42]



    sys 95 (71) [44]
    dll 13 (11) [1]
    bin 6 (2) [0]
    cpa 1 (1) [0]
    vp 5 (5) [0]
    Totals 120 (90) [45]


    ExplorerBefore DeviceManager V DriverStore2.xlsm : https://app.box.com/s/xokdiupd311mtvzwcsazh15ou13nolnq

    Last edited by DocAElstein; 03-13-2020 at 10:13 PM.

Similar Threads

  1. Tests and Notes on Range Referrencing
    By DocAElstein in forum Test Area
    Replies: 70
    Last Post: 02-20-2024, 01:54 AM
  2. Tests and Notes for EMail Threads
    By DocAElstein in forum Test Area
    Replies: 29
    Last Post: 11-15-2022, 04:39 PM
  3. Notes tests. Excel VBA Folder File Search
    By DocAElstein in forum Test Area
    Replies: 39
    Last Post: 03-20-2018, 04:09 PM
  4. Replies: 37
    Last Post: 02-28-2018, 12:22 AM
  5. Replies: 2
    Last Post: 12-04-2012, 02:05 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
  •