Page 51 of 55 FirstFirst ... 414950515253 ... LastLast
Results 501 to 510 of 541

Thread: Appendix Thread. 3 *

  1. #501
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,439
    Rep Power
    10


    https://www.youtube.com/watch?v=5ckOWXGDL34&lc=UgyqZfLMydnVuNbtqTR4AaABAg. 9ZBy1PrRmM89ZEE6b4w03-       7


    https://www.youtube.com/watch?v=5ckOWXGDL34&lc=UgzW4-G9Rh2o5ljabrV4AaABAg       13        







    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgykemWTw-fGoPwu8E14AaABAg.9iECYNx-n4U9iK75iCEaGN
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgykemWTw-fGoPwu8E14AaABAg.9iECYNx-n4U9iK7XF33njy
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugy_1xkcndYdzUapw-J4AaABAg.9iGOq_leF_E9iKCSgpAqA1
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugy_1xkcndYdzUapw-J4AaABAg.9iGOq_leF_E9iKCy--3x8E
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgwNaJiNATXshvJ0Zz94AaABAg.9iEktVkTAHk9iF9_pdsh r6
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgykemWTw-fGoPwu8E14AaABAg.9iECYNx-n4U9iFAZq-JEZ-
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgxV2r7KQnuAyZVLHH54AaABAg.9iDVgy6wzct9iFBxma9z XI
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugx12mI-a39T41NaZ8F4AaABAg.9iDQqIP56NV9iFD0AkeeJG
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgwnYuSngiuYaUhEMWN4AaABAg.9iDQN7TORHv9iFGQQ5z_ 3f
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgwJ3yzdk_EE98dndmt4AaABAg.9iDLC2uEPRW9iFGvgk11 nH
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgyDWAVqCa4yMot463x4AaABAg.9iH3wvUZj3n9iHnpOxOe Xa
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgwvLFdMEAba5rLHIz94AaABAg.9iGReNGzP4v9iHoeaCpT G8
    https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugy_1xkcndYdzUapw-J4AaABAg.9iGOq_leF_E9iHpsWCdJ5I


    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9iHOYYpaA bC
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgxuL6YCUckeUIh9hoh4AaABAg
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwGTEyefOX7msIh1wZ4AaABAg.9h4sd6Vs4qE9h7G-bVm8_-
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=Ugw3nF0C04AGt73H1BB4AaABAg.9h6VhNCM-DZ9h7EqbG23kg
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwGTEyefOX7msIh1wZ4AaABAg.9h4sd6Vs4qE9h7KvJXmK 8o
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=Ugw3nF0C04AGt73H1BB4AaABAg.9h6VhNCM-DZ9h7E1gwg4Aq
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgywFtBEpkHDuK55r214AaABAg
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h79hNGvJ bu
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h79YAfa2 4T
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h79M1SYH 1E
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h78SxhXT nR
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA

  2. #502
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,439
    Rep Power
    10
    In support of this post https://excelfox.com/forum/showthrea...ge51#post12782
    Security tweaks
    Code:
    #   Will like XP or Win7  Disable Windows Defender  Disable Defender Updates  Set UAC to Never Prompt  Disable Meltdown Flag  Disable Windows Malware Scan
    $securitylow.Add_Click({ 
        Write-Host "Lowering UAC level..."
    	Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Type DWord -Value 0
    	Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "PromptOnSecureDesktop" -Type DWord -Value 0
        Write-Host "Disabling Windows Defender..."
    	If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender")) {
    		New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Force | Out-Null
    	}
    	Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -Type DWord -Value 1
    	If ([System.Environment]::OSVersion.Version.Build -eq 14393) {
    		Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "WindowsDefender" -ErrorAction SilentlyContinue
    	} ElseIf ([System.Environment]::OSVersion.Version.Build -ge 15063) {
    		Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "SecurityHealth" -ErrorAction SilentlyContinue
    	}
        Write-Host "Disabling Windows Defender Cloud..."
    	If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet")) {
    		New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Force | Out-Null
    	}
    	Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Name "SpynetReporting" -Type DWord -Value 0
    	Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Name "SubmitSamplesConsent" -Type DWord -Value 2
        Write-Host "Disabling Meltdown (CVE-2017-5754) compatibility flag..."
    	Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat" -Name "cadca5fe-87d3-4b96-b7fb-a231484277cc" -ErrorAction SilentlyContinue
        Write-Host "Disabling Malicious Software Removal Tool offering..."
    	If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\MRT")) {
    		New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\MRT" | Out-Null
    	}
    	Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\MRT" -Name "DontOfferThroughWUAU" -Type DWord -Value 1
    	$wshell.Popup("Operation Completed",0,"Done",0x0)
    })
    Code:
    #   Enable Windows Malware Scan  Enable Meltdown Flag  Disable Windows Defender  Set UAC to Always Prompt  Disable Defender Updates      
    $securityhigh.Add_Click({ 
        Write-Host "Raising UAC level..."
    	Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Type DWord -Value 5
    	Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "PromptOnSecureDesktop" -Type DWord -Value 1
        Write-Host "Disabling SMB 1.0 protocol..."
    	Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force
        Write-Host "Enabling Windows Defender..."
    	Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -ErrorAction SilentlyContinue
    	If ([System.Environment]::OSVersion.Version.Build -eq 14393) {
    		Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "WindowsDefender" -Type ExpandString -Value "`"%ProgramFiles%\Windows Defender\MSASCuiL.exe`""
    	} ElseIf ([System.Environment]::OSVersion.Version.Build -ge 15063) {
    		Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "SecurityHealth" -Type ExpandString -Value "`"%ProgramFiles%\Windows Defender\MSASCuiL.exe`""
    	}
        Write-Host "Enabling Windows Defender Cloud..."
    	Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Name "SpynetReporting" -ErrorAction SilentlyContinue
    	Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Name "SubmitSamplesConsent" -ErrorAction SilentlyContinue
        Write-Host "Disabling Windows Script Host..."
    	Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Script Host\Settings" -Name "Enabled" -Type DWord -Value 0
        Write-Host "Enabling Meltdown (CVE-2017-5754) compatibility flag..."
    	If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat")) {
    		New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat" | Out-Null
    	}
    	Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat" -Name "cadca5fe-87d3-4b96-b7fb-a231484277cc" -Type DWord -Value 0
        Write-Host "Enabling Malicious Software Removal Tool offering..."
    	Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\MRT" -Name "DontOfferThroughWUAU" -ErrorAction SilentlyContinue
    	$wshell.Popup("Operation Completed",0,"Done",0x0)
    })

  3. #503
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,439
    Rep Power
    10
    In support of this post
    https://excelfox.com/forum/showthrea...ge51#post12783
    The ps1 file, and also below the $WindowsSearch.Add_Click(
    Code:
     Share ‘ChrisSearchTweaks18-19July.ps1     https://app.box.com/s/cbs7go8i2tdxw4wguthgxcviecaxjn6b
    iex ((New-Object System.Net.WebClient).DownloadString(' https://raw.githubusercontent.com/ChrisTitusTech/win10script/71609526b132f5cd7e3b9167779af60051a80912/win10debloat.ps1'))
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    $windowssearch.Add_Click({
        Write-Host "Disabling Bing Search in Start Menu..."
        Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "BingSearchEnabled" -Type DWord -Value 0
        <#
        Write-Host "Disabling Cortana"
        Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "CortanaConsent" -Type DWord -Value 0
        If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search")) {
            New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Force | Out-Null
        }
        #>
        Write-Host "Hiding Search Box / Button..."
        Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -Type DWord -Value 0
     
        Write-Host "Removing Start Menu Tiles"
     
        Set-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -Value '<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '  <LayoutOptions StartTileGroupCellWidth="6" />'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '  <DefaultLayoutOverride>'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '    <StartLayoutCollection>'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '      <defaultlayout:StartLayout GroupCellWidth="6" />'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '    </StartLayoutCollection>'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '  </DefaultLayoutOverride>'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '    <CustomTaskbarLayoutCollection>'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '      <defaultlayout:TaskbarLayout>'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '        <taskbar:TaskbarPinList>'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '          <taskbar:UWA AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge" />'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '          <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk" />'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '        </taskbar:TaskbarPinList>'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '      </defaultlayout:TaskbarLayout>'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '    </CustomTaskbarLayoutCollection>'
        Add-Content -Path 'C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml' -value '</LayoutModificationTemplate>'
     
        $START_MENU_LAYOUT = @"
        <LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
            <LayoutOptions StartTileGroupCellWidth="6" />
            <DefaultLayoutOverride>
                <StartLayoutCollection>
                    <defaultlayout:StartLayout GroupCellWidth="6" />
                </StartLayoutCollection>
            </DefaultLayoutOverride>
        </LayoutModificationTemplate>
    "@
     
        $layoutFile="C:\Windows\StartMenuLayout.xml"
     
        #Delete layout file if it already exists
        If(Test-Path $layoutFile)
        {
            Remove-Item $layoutFile
        }
     
        #Creates the blank layout file
        $START_MENU_LAYOUT | Out-File $layoutFile -Encoding ASCII
     
        $regAliases = @("HKLM", "HKCU")
     
        #Assign the start layout and force it to apply with "LockedStartLayout" at both the machine and user level
        foreach ($regAlias in $regAliases){
            $basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows"
            $keyPath = $basePath + "\Explorer" 
            IF(!(Test-Path -Path $keyPath)) { 
                New-Item -Path $basePath -Name "Explorer"
            }
            Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 1
            Set-ItemProperty -Path $keyPath -Name "StartLayoutFile" -Value $layoutFile
        }
     
        #Restart Explorer, open the start menu (necessary to load the new layout), and give it a few seconds to process
        Stop-Process -name explorer
        Start-Sleep -s 5
        $wshell = New-Object -ComObject wscript.shell; $wshell.SendKeys('^{ESCAPE}')
        Start-Sleep -s 5
     
        #Enable the ability to pin items again by disabling "LockedStartLayout"
        foreach ($regAlias in $regAliases){
            $basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows"
            $keyPath = $basePath + "\Explorer" 
            Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 0
        
        Write-Host "Search and Start Menu Tweaks Complete"
        } # This was missing 12 July 2021
    })

  4. #504
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,439
    Rep Power
    10
    jADHKJASHDKJahdjkAHD

  5. #505

  6. #506
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,439
    Rep Power
    10
    khskjhkshhhfhfhfslhafhalfh

  7. #507
    Junior Member
    Join Date
    Feb 2022
    Posts
    11
    Rep Power
    0

    Question Appendix Thread. 3

    Who can help me, I have the following code that I found somewhere that I don't remember:

    Code:
    Private Sub UserForm_Initialize()
    
       Dim rng As Range
    
       Set rng = Range("B4:D8")
    
       With ComboBox1
          .ColumnCount = 2
          .ColumnWidths = "50;50"
          ' load 1st, 2nd columns of range into combobox
          .List = Application.Index(rng, Evaluate("ROW(1:" & rng.Rows.Count & ")"), Array(1, 3))
       End With
    End Sub
    In "sheet1" I have three columns of data in the range from B4 to D8 (the headers in row 3). In a combobox the data of columns B and D appears.This is a multicolumn combobox with non-continuous columns (that are not next to each other). It works perfectly and is adapted to what I wanted. Unfortunately I don't understand how the line
    ".List = Application.Index(rng, Evaluate("ROW(1:" & rng.Rows.Count & ")"), Array(1, 3))"
    works and I can't stay So.

    I know that we are making an output list from an input list and I understand that evaluate with row is returning the index of the rows that have data in the range, from the first row to the fifth, and that with array we determine the columns which will take the combobox (or so I thought I understood).
    But why can't we use an array to determine the rows as well?
    I tried to do it and it didn't work for me.

    If someone is kind enough to tell me what data is returning evaluate (which is supposed to be used to occupy excel formulas in vba) with row, I would greatly appreciate it.

    I hope everything is understood. I'm using google translator.



    https://www.youtube.com/watch?v=yVgLmj0aojI&lc=UgwWg8x2WxLSxxGsUP14AaABAg.9k3ShckGnhv9k89Lsaig oO
    https://www.youtube.com/watch?v=yVgLmj0aojI&lc=UgxxxIaK1pY8nNvx6JF4AaABAg.9k-vfnj3ivI9k8B2r_uRa2
    https://www.youtube.com/watch?v=yVgLmj0aojI&lc=UgxKFXBNd6Pwvcp4Bsd4AaABAg
    https://www.youtube.com/watch?v=yVgLmj0aojI&lc=Ugw9X6QS09LuZdZpBHJ4AaABAg


    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h78GftO_ iE
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9h77HSGDH 4A
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9h76fafzc EJ
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9h759YIjl aG
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9h74pjGcb Eq
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgzJJUDVv2Mb6YGkPYh4AaABAg.9h5uPRbWIZl9h7165DZd jg
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA

  8. #508
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,439
    Rep Power
    10
    Hello Amelynn
    Welcome to ExcelFox , the thinking man’s Excel forum


    Quote Originally Posted by Amelynn View Post
    Who can help me, ....
    I think, therefore I am , and able to help you.

    Quote Originally Posted by Amelynn View Post
    ...... I don't understand how the line ".List
    = Application.Index(rng, Evaluate("ROW(1:" & rng.Rows.Count & ")"), Array(1, 3))
    " works and I can't stay So....
    To Explain

    Question: _(i) What is Array(1, 3) ?
    Answer_ It is like –
    ___1 _3
    ( Sometime we write in excel spreadsheet convention {1, 3} , but this usually means the same thing )

    Question: _(ii)a) Evaluate("ROW(1:" & rng.Rows.Count & ")")
    Answer:
    Quote Originally Posted by Amelynn View Post
    ..... evaluate (…….. used to occupy excel formulas in vba) with row,
    Correct! Good! - Because you understand this, it makes the explanation for me much easier.
    We are really only interested in understanding what is , =ROW(1:" & rng.Rows.Count & ")" , in excel spreadsheet formula

    Question: _(ii)b) What is =ROW(1:" & rng.Rows.Count & ") ? ( in excel spreadsheet )
    For your range, rng = B4:D8 , rng.Rows.Count = 5
    =ROW(1: " & rng.Rows.Count & " )
    =ROW(1: " & 5 & " )
    =ROW(1:5)

    ( Green is Excel Spreadsheet, Blue is VBA in string “ “ in Evaluate( “ “ ) )


    The excel spreadsheet Row( ) function is usually like for
    Row( A1) = 1
    but can also return a “vertical” array of values like
    Row( A1:A2) = 1
    Row( A1:A2) = 2
    Inside VBA Evaluate _ we find that we are decoupled from spreadsheet absolute values, and so in inside VBA Evaluate _
    Row(A1:A2) = Row( 1:2) = 1
    Row(A1:A2) = Row( 1:2) = 2

    ROW(1:5)
    It is like
    1
    2
    3
    4
    5

    ( Sometimes we may write
    {1
    2
    3
    4
    5}

    or sometimes we may write in excel spreadsheet convention , ={1;2;3;4;5} , but usually this means the same thing
    )
    Note: For “vertical” array some excel use ; but some Excel use \ – So sometime you may need ={1\2\3\4\5}




    Sometimes if we are lucky, Excel will try to do array calculations and return you an array.
    Like
    Code:
    	{	1	2		X	{	6	8		  =	{	1, 6	2, 8	
    		3	4	}			7	9	}			3, 7	4, 9	}
    But if you ask it to do = Index ___ , ROW(1:5)_ ,_ Array{1 , 3} it tries to look at columns and rows not specified.
    This should not work
    Code:
    =  {	1	?			   {	1	3	
    	2	?				?	?	
    	3	?		X		?	?	
    	4	?				?	?	
    	5	?	}			?	?	}
    ???? So we have a problem ?,
    But we can be lucky again, because then Excel will guess to see the following instead, ( actually its more complicated then that, more precisely it is due to Excel VBA Interception and Implicit Intersection , but we often say that Excel guesses things, as its often written to get things correct when you miss things out. ( In this particular case it is not clear if the phenomenum occurs by accident or design ) )
    Code:
    =  {	1	1			   {	1	3	
    	2	2				1	3	
    	3	3		X		1	3	
    	4	4				1	3	
    	5	5	}			1	3	}
    ( What is actually happening there above in those last two sketches is: -
    If Excel is given a single row or a single column, but is being required to look at values of further adjoining rows and columns where no values are given, then the effect of the phenomena of Excel VBA Interception and Implicit Intersection is that in certain situation the missing values will effectively be taken as a duplication of the values in the given row or column
    )

    So, Index will try to give us
    Code:
    _______    Index(    (    ,	1, 1	1, 3	
    				2, 1	2, 3	
    				3, 1	3, 3	
    				4, 1	4, 3	
    				5, 1	5, 3	  )
    So if your range is, rng = B4:D8
    -__=
    Code:
    	_B4	_C4	_D4
    	_B5	_C5	_D5
    	_B6	_C6	_D6
    	_B7	_C7	_D7
    	_B8	_C8	_D8
    then Application.Index(rng, Evaluate("=ROW(1:" & rng.Rows.Count & ")"), Array(1, 3))
    -__ =Application.Index(rng, Evaluate("=ROW(1:5)"), Array(1, 3))
    -__ =Application.Index(rng, Evaluate("={1;2;3;4;5}"), Array(1, 3))
    -__ =Application.Index(rng, Evaluate("={1;2;3;4;5}"), Evaluate("={1, 3}"))

    -__ =
    Code:
        rng  ,            1,1  1,3
                          2,1  2,3
                          3,1  3,3
                          4,1  4,3
                          5,1  5,3
    -__=
    Code:
        _B4 _C4 _D4       1,1  1,3
        _B5 _C5 _D5       2,1  2,3
        _B6 _C6 _D6       3,1  3,3
        _B7 _C7 _D7       4,1  4,3
        _B8 _C8 _D8       5,1  5,3
    Code:
    	  =     _B4	_D4
    		_B5	_D5
    		_B6	_D6
    		_B7	_D7
    		_B8	_D8


    Quote Originally Posted by Amelynn View Post
    ........use an array to determine the rows as well......
    Sure, this is no problem:
    One way, for example, for just 1st 3rd and 5th row
    Change
    Evaluate("={1;2;3;4;5}")
    to
    Evaluate("={1;3;5}")

    -__ =Application.Index(rng, Evaluate("={1;3;5}"), Array(1, 3))
    -__ =Application.Index(rng, Evaluate("={1;3;5}"), Evaluate("={1, 3}"))

    Code:
        _B4 _C4 _D4       1,1  1,3
        _B5 _C5 _D5       3,1  3,3
        _B6 _C6 _D6       5,1  5,3
        _B7 _C7 _D7
        _B8 _C8 _D8
    Code:
    	  =     _B4	_D4
    		_B6	_D6
    		_B8	_D8



    Here a demo macro for you
    Put some arbitrary values in your range "B4:D8" , then run this macro:
    Code:
    Sub Test()
    Dim Rng As Range
     Set Rng = Worksheets("Sheet1").Range("B4:D8")
    Dim RwsCnt As Long
     Let RwsCnt = Rng.Rows.Count '  is = 5
    
    Dim arr_List() As Variant
     Let arr_List() = Application.Index(Rng, Evaluate("=ROW(1:" & Rng.Rows.Count & ")"), Array(1, 3))
     Let arr_List() = Application.Index(Rng, Evaluate("=ROW(1:" & RwsCnt & ")"), Array(1, 3))
     Let arr_List() = Application.Index(Rng, Evaluate("=ROW(1:5)"), Array(1, 3))
     Let arr_List() = Application.Index(Rng, Evaluate("={1;2;3;4;5}"), Array(1, 3))
     Let arr_List() = Application.Index(Rng, Evaluate("={1;2;3;4;5}"), Evaluate("={1,3}"))
    
     Let Worksheets("Sheet1").Range("A40").Resize(UBound(arr_List(), 1), UBound(arr_List(), 2)).Value = arr_List()
    
    ' To only select 1st 3rd and 5th row
     Let arr_List() = Application.Index(Rng, Evaluate("={1;3;5}"), Evaluate("={1,3}"))
     Let Worksheets("Sheet1").Range("A47").Resize(UBound(arr_List(), 1), UBound(arr_List(), 2)).Value = arr_List()
    
    End Sub



    Alan
    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. #509
    Junior Member
    Join Date
    Feb 2022
    Posts
    11
    Rep Power
    0
    Thank you so so so much! By your will and this incredible tutorial. I hope one day to have at least a fraction of your understanding of excel. I searched a lot for an explanation about this and I really appreciate that people like you exist. And I appreciate the internet too.

    Thanks again DocAElstein, you are the best!



    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgwplzlpYpmRqjGZem14AaABAg.9hrvbYRwXvg9ht4b7z00 X0
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgyOGlCElBSbfPIzerF4AaABAg.9hrehNPPnBu9ht4us7Tt Pr
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgwHjKXf3ELkU4u4j254AaABAg.9hr503K8PDg9ht5mfLcg pR
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw1-OyZiDDxCHM2Rmp4AaABAg.9hqzs_MlQu-9ht5xNvQueN
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg.9htChVuaX9W9htG01cKBzX
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw6UrV69zpeKvLOeOV4AaABAg.9ht16tzryC49htJ6TpIO XR
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgwMKwGZpDjv7vi7pCx4AaABAg
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw6UrV69zpeKvLOeOV4AaABAg.9ht16tzryC49htOKs4jh 3M
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgxVW-am20rQ5GFuJ9F4AaABAg
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugygb0YiLOI7fG1zQSx4AaABAg
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugygb0YiLOI7fG1zQSx4AaABAg.9htWqRrSIfP9i-fyT84gqd
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugygb0YiLOI7fG1zQSx4AaABAg.9htWqRrSIfP9i-kIDl-3C9
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg.9htChVuaX9W9i57J9GEOUB
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg.9htChVuaX9W9i58MGeM8Lg
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg.9htChVuaX9W9i59prk5atY
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgwaWs6XDXdQybNb8tZ4AaABAg.9i5yTldIQBn9i7NB1gjy Bk
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgxV9eNHvztLfFBGsvZ4AaABAg.9i5jEuidRs99i7NUtNNy 1v
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugx2zSXUtmLBSDoNWph4AaABAg.9i3IA0y4fqp9i7NySrZa md
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz4oMZ09MKcExYlWf94AaABAg.9hwsCHaKX6A9i7Qs8kxE qH
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz4oMZ09MKcExYlWf94AaABAg.9hwsCHaKX6A9i7TqGQYq Tz
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz4oMZ09MKcExYlWf94AaABAg.9hwsCHaKX6A9iAJSNws8 Zz
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz4oMZ09MKcExYlWf94AaABAg.9hwsCHaKX6A9iAJvZ6km lx
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz4oMZ09MKcExYlWf94AaABAg.9hwsCHaKX6A9iAK0g1dU 7i
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz4oMZ09MKcExYlWf94AaABAg.9hwsCHaKX6A9iAKCDqNm nF
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz4oMZ09MKcExYlWf94AaABAg.9hwsCHaKX6A9iAKHVSTG Hy
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz4oMZ09MKcExYlWf94AaABAg.9hwsCHaKX6A9iAKSBKPc J6
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz4oMZ09MKcExYlWf94AaABAg.9hwsCHaKX6A9iAKgL6lr cT
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz4oMZ09MKcExYlWf94AaABAg.9hwsCHaKX6A9iAKlts8h KZ
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz4oMZ09MKcExYlWf94AaABAg.9hwsCHaKX6A9iAKrX7UP P0
    https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz4oMZ09MKcExYlWf94AaABAg.9hwsCHaKX6A9iAL5MSjW pA

  10. #510
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,439
    Rep Power
    10
    In support of these issues
    https://excelfox.com/forum/showthrea...ge51#post12784 https://www.youtube.com/watch?v=dKM8ZScbic8&t=75s
    Winget issues https://github.com/ChrisTitusTech/wi...770ae56d3b6e85
    https://github.com/ChrisTitusTech/wi...b236f3ecf290db

    06.07.2021 The Best Windows Utility ( second nice shade of grey GUI )
    Code:
    Write-Host "Checking winget..."
    
    Try{
    	# Check if winget is already installed
    	$er = (invoke-expression "winget -v") 2>&1
    	if ($lastexitcode) {throw $er}
    	Write-Host "winget is already installed."
    }
    Catch{
    	# winget is not installed. Install it from the Github release
    	Write-Host "winget is not found, installing it right now."
    	
    	$download = "https://github.com/microsoft/winget-cli/releases/download/v1.0.11692/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
    	$output = $PSScriptRoot + "\winget-latest.appxbundle"
    	Write-Host "Dowloading latest release"
    	Invoke-WebRequest -Uri $download -OutFile $output
    	
    	Write-Host "Installing the package"
    	Add-AppxPackage -Path $output
    }
    Finally {
    	# Start installing the packages with winget
    	#Get-Content .\winget.txt | ForEach-Object {
    	#	iex ("winget install -e " + $_)
    	#}
    }


    The Ultimate Windows Utility Upgrade 29 09 2021
    Code:
    Write-Host "Checking winget..."
    
    Try{
    	# Check if winget is already installed
    	$er = (invoke-expression "winget -v") 2>&1
    	if ($lastexitcode) {throw $er}
    	Write-Host "winget is already installed."
    }
    Catch{
    	# winget is not installed. Install it from the Microsoft Store
    	Write-Host "winget is not found, installing it right now."
    
    	Start-Process "ms-appinstaller:?source=https://aka.ms/getwinget"
    	$nid = (Get-Process AppInstaller).id
    	Wait-Process -Id $nid
    
    }
    Finally {
    	# Start installing the packages with winget
    	#Get-Content .\winget.txt | ForEach-Object {
    	#	iex ("winget install -e " + $_)
    	#}
    }
    A commit a bit later by mrhaydendp to simplify a bit https://github.com/ChrisTitusTech/wi...0db?diff=split
    Code:
    Write-Host "Checking winget..."
    
    # Check if winget is installed
    if (Test-Path ~\AppData\Local\Microsoft\WindowsApps\winget.exe){
        'Winget Already Installed'
    }  
    else{
        # Installing winget from the Microsoft Store
    	Write-Host "Winget not found, installing it now."
    	Start-Process "ms-appinstaller:?source=https://aka.ms/getwinget"
    	$nid = (Get-Process AppInstaller).Id
    	Wait-Process -Id $nid
    	Write-Host Winget Installed
    }

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
  •