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 ]
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………………._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
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()
Here the results from the previous and current macroCode: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
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
Bookmarks