Page 22 of 55 FirstFirst ... 12202122232432 ... LastLast
Results 211 to 220 of 541

Thread: Appendix Thread. 3 *

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

    This is matching Device Manager Properties to DriverStore

    This is the first use of italicising, in plce of coloring to indicate the match, becaus we want to retain the colour as an indication that a match was found in drivers

    Code:
    Sub CompareDriverFilesDeviceManagerInDriverStore() ' http://www.excelfox.com/forum/showthread.php/2408-Windows-10-and-Office-Excel/page11#post12277
    Rem 0
        If ActiveSheet.Name <> "DeviceManagerProperties" Then
         MsgBox prompt:="Oops": Exit Sub
        Else
        End If
    Rem 1 Worksheets info
    Dim WsDMP As Worksheet, WsDrSt As Worksheet
     Set WsDMP = Worksheets("DeviceManagerProperties"): Set WsDrSt = Worksheets("DriverStore")
    
    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. Each should be a cell in DeviceManagerProperties
        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
            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 "\")  ---   the characters count left over after the subtraction is equal to the character length of the file name
            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("=DriverStore!D5:DriverStore!F4437")    '
            Dim FndCel As Range: Set FndCel = SrchRng.Find(what:=FileNmeSrchFor, After:=Application.Range("=DriverStore!D5"), 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
                '4a) but we might already have a match,
                    If SrchForCel.Font.Color <> 0 Then ' Extra things to do if we already found the cell value in drivers
                     Let ClrIdx = SrchForCel.Font.ColorIndex ' this will make the line below to colorthe text of this cell redundant but will ensure that we use the same color in the DriverStore worksheet rather than the randomly generated one
                     WsDMP.Activate: SrchForCel.Select
                     Let SrchForCel.Font.Underline = True
                    Else
                    End If
                '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
                 WsDMP.Activate: SrchForCel.Select ' This worksheet will be colured
                 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
                 Let SrchForCel.Font.Italic = True
                 
                 WsDrSt.Activate: FndCel.Select ' the other workseet
                 Application.Wait (Now + TimeValue("00:00:02"))
                 Let FndCel.Font.ColorIndex = ClrIdx
                Else ' No match was found - the thing in the cell in this worksheet is not in the other worksheet
                End If
            Else ' case no file path string in cell
            End If
        Next SrchForCel
    End Sub

    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgxesLhWNr_zNP0GUdh4AaABAg.9hI1CQJMLLo9hWn2pGBe SS
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgzkRujoMw9PblmXDQ14AaABAg.9hJRnEjxQrd9hJoCjomN I2
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgzPZbG7OvUkh35nXDd4AaABAg.9hJOZEEZa6p9hJqLC7El-w
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgwUcEpm8u6ZW3uOHXx4AaABAg.9hIlxxGY7t49hJsB2PWx C4
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgyvDj6NWT1Gxyy2JyR4AaABAg.9hIKlNPeqDn9hJskm92n p6
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=Ugwy7qx_kG9iUmMVO_F4AaABAg.9hI2IGUdmTW9hJuyaQaw qx
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgxesLhWNr_zNP0GUdh4AaABAg.9hI1CQJMLLo9hJwTB9Jl ob
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgyyQWYVP1OnCqavb-x4AaABAg
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgwJKKmExZ1FdZVDJf54AaABAg
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=Ugz_p0kVGrLntPtYzCt4AaABAg
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

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



    Code:
    Sub FileTypesHereInDeviceManagerPropertiesUndDriverStoreUnddrivers() ' http://www.excelfox.com/forum/showthread.php/2408-Windows-10-and-Office-Excel/page18#post12360
    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
    Dim Ddl3 As Long, Sys3 As Long, Bin3 As Long, Cpa3 As Long, Vp3 As Long, Els3 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 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
                    End If
                End If
    '        Next ClCnt
    '    Next RwCnt
        Next rngStr
    Rem 4 output
    
    Debug.Print "sys     " & Sys & " (" & Sys2 & ")   [" & Sys3 & "]"
    Debug.Print "dll     " & Ddl & " (" & Ddl2 & ")   [" & Ddl3 & "]"
    Debug.Print "bin     " & Bin & " (" & Bin2 & ")   [" & Bin3 & "]"
    Debug.Print "cpa     " & Cpa & " (" & Cpa2 & ")   [" & Cpa3 & "]"
    Debug.Print "vp      " & Vp & " (" & Vp2 & ")    [" & Vp3 & "]"
    Debug.Print "els     " & Els & " (" & Els2 & ")   [" & Els3 & "]"
    
    Debug.Print "Totals " & Sys + Ddl + Bin + Cpa + Vp + Els & " (" & Sys2 + Ddl2 + Bin2 + Cpa2 + Vp2 + Els2 & ") [" & Sys3 + Ddl3 + Bin3 + Cpa3 + Vp3 + Els3 & "]"
    End Sub
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

  3. #213
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,402
    Rep Power
    10
    In support of this Thread: http://www.excelfox.com/forum/showth...2530#post12530


    Quote Originally Posted by fixer View Post
    ..save and close the sample2.xls and sample3.xlsb...
    To help get syntax we can use a macro recording…


    Macro recording for simple save..

    Open sample2.xls
    Open sample3.xlsb
    Open sample1.xlsm

    StartMacroRecording.JPG : https://imgur.com/4KAUJGa
    NameRecordingMacro.JPG : https://imgur.com/AP6qdY2

    Save sample2 xls.jpg : https://imgur.com/JhQEZzv
    Close sample2 xls.JPG : https://imgur.com/aEKtCTN

    Save sample3 xlsb.JPG : https://imgur.com/ontjd4z
    Close sample3 xlsb.JPG : https://imgur.com/kbDEhfm

    Stop Recording Macro.JPG : https://imgur.com/loqaTkc

    Recorded Macro.JPG : https://imgur.com/SFY0jcW



    Code:
    Sub AvASave()
    '
    ' AvASave Makro
    '
    
    '
        Windows("sample2.xls").Activate
        ActiveWorkbook.Save
        ActiveWorkbook.Close
        Windows("sample3.xlsb").Activate
        ActiveWorkbook.Save
        ActiveWorkbook.Close
    End Sub


    Macro recording for Save As..

    Open sample2.xls
    Open sample3.xlsb
    Open sample1.xlsm

    StartMacroRecording.JPG : https://imgur.com/4KAUJGa
    NameRecordingMacro2.JPG : https://imgur.com/mDEneOt

    SaveAs sample2 xls.jpg : https://imgur.com/xjqgPRO , https://imgur.com/UpT3pAB
    Close sample2 xls.JPG : https://imgur.com/aEKtCTN

    SaveAs sample3 xlsb.JPG : https://imgur.com/QF5yo6L , https://imgur.com/hgyV1Tm
    Close sample3 xlsb.JPG : https://imgur.com/kbDEhfm

    Stop Recording Macro.JPG : https://imgur.com/loqaTkc

    Recorded Macro2.JPG : https://imgur.com/zHm6DY2

    Code:
    Sub AvASaveAs()
    '
    ' AvASaveAs Makro
    '
        Windows("sample2.xls").Activate
        ActiveWorkbook.SaveAs Filename:= _
            "F:\Excel0202015Jan2016\ExcelFox\vixer\sample2.xls", FileFormat:=xlExcel8, _
            Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
            CreateBackup:=False
        ActiveWorkbook.Close
        Windows("sample3.xlsb").Activate
        ActiveWorkbook.SaveAs Filename:= _
            "F:\Excel0202015Jan2016\ExcelFox\vixer\sample3.xlsb", FileFormat:=xlExcel12, _
            CreateBackup:=False
        ActiveWorkbook.Close
    End Sub
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

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


    Code:
    Sub FileTypesHereDoubleDriverFull()
    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 & " (" & Ppd2 & ")"
    Debug.Print "exe   " & Exe & " (" & Exe2 & ")"
    ' DPB
    Debug.Print "dpb   " & Dpb & " (" & Dpb2 & ")"
    
    Debug.Print " Total " & Sys + Ddl + Bin + Cpa + Vp + Els + Inf + Ini + Cat + Gpd + Xml + Gdl + Js + Dpd + Cab + Bag + Ppd + Exe + Dpb & " (" & Sys2 + Ddl2 + Bin2 + Cpa2 + Vp2 + Els2 + Inf2 + Ini2 + Cat2 + Gpd2 + Xml2 + Gdl2 + Js2 + Dpd2 + Cab2 + Bag2 + Ppd2 + Exe2 + Dpb2 & ")"
    End Sub
    
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

  5. #215
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,402
    Rep Power
    10
    In support of this Post
    http://www.excelfox.com/forum/showth...ge19#post12364

    Code:
    Sub Compare_drivers_In_DoubleDriver() ' http://www.excelfox.com/forum/showthread.php/2408-Windows-10-and-Office-Excel/page19#post12364
    Rem 0
        If ActiveSheet.Name <> "drivers" Then ' This macro was intended to be run from  drivers  to look for things from it in  DoubleDriver
         MsgBox prompt:="Oops": Exit Sub                               '      **the selection should be in drivers
        Else
        End If
    Rem 1 Worksheets info
    Dim WsDD As Worksheet, WsDrs As Worksheet
     Set WsDD = Worksheets("DDAllBefore"): Set WsDrs = Worksheets("drivers")
    
    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, **the selection should be in drivers
        Dim CelVl As String: Let CelVl = SrchForCel.Value
            If CelVl <> "" And InStr(4, CelVl, ".", vbBinaryCompare) > 1 Then      '                          And Left(CelVl, 3) = "C:\" And InStr(4, CelVl, ".", vbBinaryCompare) > 1 Then ' use some criteria to check we have a file path
            Dim FileNmeSrchFor As String
             Let FileNmeSrchFor = Replace(CelVl, ".mui", "", 1, 1, vbBinaryCompare)                                              '   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 "\")  ---   the characters count left over after the subtraction is equal to the character length of the file name
            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("=DDAllBefore!D5:DDAllBefore!G670")    '
            Dim FndCel As Range: Set FndCel = SrchRng.Find(what:=FileNmeSrchFor, After:=Application.Range("=DDAllBefore!D5"), 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
                 WsDrs.Activate: SrchForCel.Select ' This worksheet will be colured
                 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
                 
                 WsDD.Activate: FndCel.Select ' the other workseet, that being looked in for the file
                 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
            Else ' case no file path string in cell
            End If
        Next SrchForCel
    End Sub
    





    ExplorerBefore Double Driver V DriverStore Abort.xlsm : https://app.box.com/s/uqupktt1ppxar3frhg2n7tqbb9vn181e
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

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


    Code:
    Sub CompareDriverFilesDoubleDriverInDriverStoreFindNext() ' http://www.excelfox.com/forum/showthread.php/2408-Windows-10-and-Office-Excel/page21#post12386
    Rem 0
        If ActiveSheet.Name <> "DDAllBefore" Then
         MsgBox prompt:="Oops": Exit Sub
        Else
        End If
    Rem 1 Worksheets info
    Dim WsDD As Worksheet, WsDrSt As Worksheet
     Set WsDD = Worksheets("DDAllBefore"): Set WsDrSt = Worksheets("DriverStore")
    
    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. Each should be a cell in DeviceManagerProperties
        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
            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 "\")  ---   the characters count left over after the subtraction is equal to the character length of the file name
             Let FileNmeSrchFor = CelVl ' In Double Drivers the cells are not shown as a full path,  so the last line is not necerssary
            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("=DriverStore!D5:DriverStore!F4437")    '
            Dim FndCel As Range: Set FndCel = SrchRng.Find(what:=FileNmeSrchFor, After:=Application.Range("=DriverStore!D5"), 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
                  Do While Not FndCel Is Nothing ' Start Find next loop =
                    Rem 4 we have two matching cells
                    '4a) but we might already have a match,
                        If SrchForCel.Font.Color <> 0 Then ' Extra things to do if we already found the cell value in drivers
                         Let ClrIdx = SrchForCel.Font.ColorIndex ' this will make the line below to colorthe text of this cell redundant but will ensure that we use the same color in the DriverStore worksheet rather than the randomly generated one
                         WsDD.Activate: SrchForCel.Select
                         Let SrchForCel.Font.Underline = True
                        Else
                        End If
                    '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
                     WsDD.Activate: SrchForCel.Select ' This worksheet will be colured
                     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
                     Let SrchForCel.Font.Italic = True
                     
                     WsDrSt.Activate: FndCel.Select ' the other workseet
                     Application.Wait (Now + TimeValue("00:00:02"))
                     Let FndCel.Font.ColorIndex = ClrIdx
                  Set FndCel = Application.Range("=DriverStore!D" & FndCel.Row + 1 & ":DriverStore!F4437").Find(what:=FileNmeSrchFor, After:=Application.Range("=DriverStore!F4437"), LookIn:=xlValues, LookAt:=xlPart, searchorder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)  '
                  Loop  '  End Find next loop ========================
                Else ' No match was found - the thing in the cell in this worksheet is not in the other worksheet
                End If
            Else ' case no file path string in cell
            End If
        Next SrchForCel
    End Sub
    
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

  7. #217
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,402
    Rep Power
    10
    Do While Loop start further down macro in support of this Post:



    Code:
    Sub CompareDriverFilesDoubleDriverInDriverStoreFindNext() ' http://www.excelfox.com/forum/showthread.php/2408-Windows-10-and-Office-Excel/page21#post12386
    Rem 0
        If ActiveSheet.Name <> "DDAllBefore" Then
         MsgBox prompt:="Oops": Exit Sub
        Else
        End If
    Rem 1 Worksheets info
    Dim WsDD As Worksheet, WsDrSt As Worksheet
     Set WsDD = Worksheets("DDAllBefore"): Set WsDrSt = Worksheets("DriverStore")
    
    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. Each should be a cell in DeviceManagerProperties
        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
            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 "\")  ---   the characters count left over after the subtraction is equal to the character length of the file name
             Let FileNmeSrchFor = CelVl ' In Double Drivers the cells are not shown as a full path,  so the last line is not necerssary
            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("=DriverStore!D5:DriverStore!F4437")    '
            Dim FndCel As Range: Set FndCel = SrchRng.Find(what:=FileNmeSrchFor, After:=Application.Range("=DriverStore!D5"), 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
                  'Do While Not FndCel Is Nothing ' Start Find next loop =
                    Rem 4 we have two matching cells
                    '4a) but we might already have a match,
                        If SrchForCel.Font.Color <> 0 Then ' Extra things to do if we already found the cell value in drivers
                         Let ClrIdx = SrchForCel.Font.ColorIndex ' this will make the line below to colorthe text of this cell redundant but will ensure that we use the same color in the DriverStore worksheet rather than the randomly generated one
                         WsDD.Activate: SrchForCel.Select
                         Let SrchForCel.Font.Underline = True
                        Else
                        End If
                    'Debug.Print FndCel.Value
                   Do While Not FndCel Is Nothing ' Start Find next loop ======
                    '4b) color matching file names in each worksheet, we do the unecerssary activating and selecting so we can see what is going in
                     WsDD.Activate: SrchForCel.Select ' This worksheet will be colured
                     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
                     Let SrchForCel.Font.Italic = True
                     
                     WsDrSt.Activate: FndCel.Select ' the other workseet
                     Application.Wait (Now + TimeValue("00:00:02"))
                     Let FndCel.Font.ColorIndex = ClrIdx
                  Set FndCel = Application.Range("=DriverStore!D" & FndCel.Row + 1 & ":DriverStore!F4437").Find(what:=FileNmeSrchFor, After:=Application.Range("=DriverStore!F4437"), LookIn:=xlValues, LookAt:=xlPart, searchorder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)  '
                  Loop  '  End Find next loop =================================
                Else ' No match was found - the thing in the cell in this worksheet is not in the other worksheet
                End If
            Else ' case no file path string in cell
            End If
        Next SrchForCel
    End Sub
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

  8. #218
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,402
    Rep Power
    10
    In support of answer for this Thread:
    http://www.excelfox.com/forum/showth...lighted-colour


    Initial 1.xlsx
    _____ Workbook: 1.xlsx ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    1
    Stock Name
    2
    A2
    22
    32
    42
    52
    62
    72
    3
    A3
    23
    33
    43
    53
    63
    73
    4
    A4
    24
    34
    44
    54
    64
    74
    5
    A5
    25
    35
    45
    55
    65
    75
    6
    A6
    26
    36
    46
    56
    66
    76
    7
    A7
    27
    37
    47
    57
    67
    77
    8
    A8
    28
    38
    48
    58
    68
    78
    Worksheet: Tabelle1



    After the following code section we have a modified worksheet
    Code:
    Rem 2  .... initial adjustment so that I can detect the highlighted cells in a different way
    Dim Rng As Range
     For Each Rng In Ws1.UsedRange.Offset(0, 2).Resize(, Ws1.UsedRange.Columns.Count - 1)
        If Rng.Interior.Color = 65535 Then
         Let Rng.Value = "=" & """" & Rng.Value & """"
        Else
        End If
        
    _____ Workbook: 1.xlsx ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    1
    Stock Name
    2
    A2
    22
    32
    42
    52
    62
    72
    3
    A3
    23
    ="33"
    43
    53
    63
    73
    4
    A4
    24
    34
    44
    ="54"
    64
    ="74"
    5
    A5
    25
    35
    ="45"
    55
    65
    75
    6
    A6
    26
    36
    46
    56
    66
    76
    7
    A7
    27
    37
    47
    57
    ="67"
    77
    8
    A8
    28
    38
    48
    58
    68
    78
    9
    Worksheet: Tabelle1


    First worksheet in 2.xlsx, before running macro, showing the Matched A5 in row 6
    _____ Workbook: 2.xlsx ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    1
    Symbol
    2
    x H2
    3
    r H3
    4
    f H4
    5
    gdg H5
    6
    A5 H6
    7
    5
    H7
    8
    h H8
    9
    Worksheet: Tabelle1


    After running macro:-
    _____ Workbook: 2.xlsx ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    1
    Symbol
    2
    x H2
    3
    r H3
    4
    f H4
    5
    gdg H5
    6
    A5 H6 45
    7
    5
    H7
    8
    h H8
    9
    Worksheet: Tabelle1




    1.xlsx : https://app.box.com/s/dgufdfvw3lm3knkvwvp0xgiqpwarqf69
    2.xlsx : https://app.box.com/s/51cykk4zd6ldan8puz70o3zyj0e17rwf
    macro.xlsm : https://app.box.com/s/tbis0g4n6l6386df6xjwh4cirbtgphzl
    Attached Files Attached Files
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

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


    Before:
    _____ Workbook: 1.xlsx ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    1
    Stock Name Data Data Data Data Data Data Data Data Data Data Data Data
    2
    ACC
    800
    700
    600
    500
    400
    300
    200
    100
    90
    80
    70
    3
    ADANIENT
    800
    700
    600
    500
    400
    300
    200
    100
    90
    80
    70
    4
    ADANIPORTS
    800
    700
    600
    500
    400
    300
    200
    100
    90
    80
    70
    If there are no highlighted colour cells in the row then copy paste the firt cells of that row i. e 800(B4)
    5
    ADANIPOWER
    800
    700
    600
    500
    400
    300
    200
    100
    90
    80
    70
    and sorry Doc Sir one mistake happened from my end in providing the info to u , we have to copy and paste the data after highlighted colours cells
    6
    AMARAJABAT
    800
    700
    600
    500
    400
    300
    200
    100
    90
    80
    70
    And one more thing plz see A8 it doesnt have highlighted colour cells in that row then we have to copy and paste the first cell i. e B8(800)but A8 will not match with column B of 2.xlsx so ignore that don't do anything for that just ignore it
    7
    AMBUJACEM
    800
    700
    600
    500
    400
    300
    200
    100
    90
    80
    70
    8
    ONGC
    800
    700
    600
    500
    400
    300
    200
    100
    90
    80
    70
    9
    Worksheet: Sheet1
    _____ Workbook: 2.xlsx ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    1
    Exchange Symbol Series/Expiry Open High Low Prev Close LTP
    2
    NSE ACC EQ
    130
    132.7
    127.4
    139.1
    130.3
    3
    NSE AMARAJABAT EQ
    102.35
    104.7
    101
    105.65
    103.55
    4
    NSE ADANIENT EQ
    215.1
    216.65
    207.5
    221.75
    210.35
    5
    NSE AMBUJACEM EQ
    198.75
    202.4
    195.4
    204.4
    201.05
    6
    NSE ADANIPORTS EQ
    339.8
    339.8
    331.25
    349.15
    336.35
    7
    NSE ADANIPOWER EQ
    268
    273.65
    253.95
    288.5
    270.1
    8
    Worksheet: Sheet1
    need match column A stock name of 1.xlsx with column B of 2. xlsx and if it matches then we have to copy and paste the data after highlighted colours cells in that row of 1.xlsx and paste it to column L OF 2.xlsx

    If there are no highlighted colour cells in the row then copy paste the firt cells of that row i. e 800(B4)
    And one more thing plz see A8 it doesnt have highlighted colour cells in that row then we have to copy and paste the first cell i. e B8(800)but A8 will not match with column B of 2.xlsx so ignore that don't do anything for that just ignore it


    here is after
    _____ Workbook: 2.xlsx ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    1
    Exchange Symbol Series/Expiry Open High Low Prev Close LTP
    2
    NSE ACC EQ
    130
    132.7
    127.4
    139.1
    130.3
    400
    3
    NSE AMARAJABAT EQ
    102.35
    104.7
    101
    105.65
    103.55
    300
    4
    NSE ADANIENT EQ
    215.1
    216.65
    207.5
    221.75
    210.35
    600
    5
    NSE AMBUJACEM EQ
    198.75
    202.4
    195.4
    204.4
    201.05
    800
    6
    NSE ADANIPORTS EQ
    339.8
    339.8
    331.25
    349.15
    336.35
    800
    7
    NSE ADANIPOWER EQ
    268
    273.65
    253.95
    288.5
    270.1
    200
    8
    Worksheet: Sheet1

    _.______________________

    here is latest macro, in next post....
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

  10. #220
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,402
    Rep Power
    10
    Macro for last post
    Code:
    Sub PasteHighlightedCellsFromMatchedColumnRows2() ' http://www.excelfox.com/forum/showthread.php/2425-Copy-and-paste-by-highlighted-colour-Paste-Highlighted-Cells-From-Matched-Column-Rows?p=12575&viewfull=1#post12575
    Rem 1 Worksheets info
    Dim Ws1 As Worksheet, Ws2 As Worksheet
     Set Ws1 = Workbooks("1.xlsx").Worksheets.Item("Sheet1"): Set Ws2 = Workbooks("2.xlsx").Worksheets.Item("Sheet1")
    Rem 2  .... initial adjustment so that I can detect the highlighted cells in a different way
    Dim Rng As Range
    '  For Each Rng In Ws1.UsedRange.Offset(0, 2).Resize(, Ws1.UsedRange.Columns.Count - 2) ' We are intersted in the range offset 2 columns to the left of size 2 columns less than the main used range
      For Each Rng In Ws1.Range("A2:L" & Ws1.UsedRange.Rows.Count & "")
        If Rng.Interior.Color = 65535 Then
         Let Rng.Value = "=" & """" & Rng.Value & """"
        Else
        End If
      Next Rng
    Rem 3  match column A stock name of 1.xlsx with column B of 2.xlsx and if it matches then copy the yellow highlighted colured cell data in that row of 1.xlsx and paste it to column L OF 2.xlsx
    Dim Lr1 As Long: Let Lr1 = Ws1.UsedRange.Rows.Count
      For Each Rng In Ws1.Range("A2:A" & Lr1 & "") '  Ws1 column A
      Dim Lr2 As Long: Let Lr2 = Ws2.UsedRange.Rows.Count
      Dim SrchRng As Range: Set SrchRng = Ws2.Range("B2:B" & Lr2 & "")
      Dim RngMtch As Range
       Set RngMtch = SrchRng.Find(What:=Rng.Value, After:=Ws2.Range("B2"), LookAt:=xlWhole, searchorder:=xlNext, MatchCase:=True) '
        If RngMtch Is Nothing Then
        
        Else ' a cell from column a 1.xlsx is matched to a cell from column B 2.xlsx
        Dim HigChk As Range
         Set HigChk = Rng.Offset(0, 1).Resize(, Ws1.UsedRange.Columns.Count - 1).Find(What:="=", LookIn:=xlFormulas, LookAt:=xlPart)
            If Not HigChk Is Nothing Then ' we found a highlighted cell -----------
            ' copy the yellow highlighted colured cell data in that row of 1.xlsx
             Rng.Offset(0, 1).Resize(, Ws1.UsedRange.Columns.Count - 1).SpecialCells(xlCellTypeFormulas, xlNumbers + xlTextValues).Offset(0, 1).Copy
            ' paste it to column L OF 2.xlsx
            Else ' case no highlighted cell, so column B should be copüied from 1.xlsx
             Rng.Offset(0, 1).Copy
            End If                        ' we were looking for highligted cell ---
         Ws2.Range("L" & RngMtch.Row & "").PasteSpecial Paste:=xlPasteValues
        End If
      Next Rng ' Ws1 column A
    Rem 4 save and close both the file after doing the process
    Workbooks("1.xlsx").Close savechanges:=False
    Workbooks("2.xlsx").Close savechanges:=True
    End Sub




    1.xlsx : https://app.box.com/s/dgufdfvw3lm3knkvwvp0xgiqpwarqf69
    2.xlsx : https://app.box.com/s/51cykk4zd6ldan8puz70o3zyj0e17rwf
    macro.xlsm : https://app.box.com/s/tbis0g4n6l6386df6xjwh4cirbtgphzl
    Attached Files Attached Files
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

Similar Threads

  1. Replies: 185
    Last Post: 05-22-2024, 10:02 PM
  2. Replies: 603
    Last Post: 05-20-2024, 03:31 PM
  3. Replies: 293
    Last Post: 09-24-2020, 01:53 AM
  4. Appendix Thread. Diet Protokol Coding Adaptions
    By DocAElstein in forum Test Area
    Replies: 6
    Last Post: 09-05-2019, 10:45 AM

Posting Permissions

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