Ideas how to display a filtered list …

adambc

Active Member
Joined
Jan 13, 2020
Messages
380
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
I have a table with 20 columns - records are added via a UserForm which allocates a sequential unique key to each new record (Column A) …

Records are updated via another UserForm - users click on the unique key in column A, then a button which invokes the UserForm …

The Command Button options on the UserForm are “Cancel” (which unloads the UserForm without saving changes after a Y/N MsgBox warning dialogue) - and “Save” which does two things (three if you the check for changes which reverts to “Cancel” if there are none) …

i) the current record is copied to the next empty row in a table (“History Log”) on another Worksheet - Date/Time and Username are added to the copied record …

ii) the current record is overwritten by the data from the UserForm …

This all works well and users can filter the History Log to see any updates to the record, but users are getting quite clumsy in their filtering of the History Log and I’m looking for a way to control this …

Is it possible to pass a variable (the record unique key) to a VBA routine that does the filtering automatically and then resets the filtering once the user has finished - and before you start telling me I’m being vague, I know!

I have thought about populating a child UserForm with up to (say) the latest 6 updates, but with 20 columns that could be a bit messy! …

Hence this post to see if anyone has any ideas?

Many thanks in advance …
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
I don't know why you would want to be intentionally vague when you are looking for help...
At any rate I have question: Is the filtered History Log, read only, or do you want your users to be able to edit the filtered records.
 
Upvote 0
I don't know why you would want to be intentionally vague when you are looking for help...
At any rate I have question: Is the filtered History Log, read only, or do you want your users to be able to edit the filtered records.
Because I wasn’t sure what is possible, not because I wanted to be vague!

Read only - since my post, I’ve been looking at UserForms with a ListBox, with AutoFilter - just need to figure out how to only display filtered rows?
 
Upvote 0
Fair enough. A few more questions: The "History Log" is indeed a table and not a range of data. If so, what is the name of the table and what is the name of the sheet the table is on and is it the only table on the sheet...
 
Upvote 0
Fair enough. A few more questions: The "History Log" is indeed a table and not a range of data. If so, what is the name of the table and what is the name of the sheet the table is on and is it the only table on the sheet...
Yes, it’s a table …

Worksheet = “History Log” (with a space) ..,

Table = “HistoryLog” (without a space) …

I’ve got the ListBox working with Column Headers - but even though the Table is filtered, it’s still bringing through the unfiltered Table …

Thanks …
 
Upvote 0
This is not exactly what you asked for- a userform with a listbox. What this will do is add a new sheet to your workbook which is populated with the data from the History Log Table filtered by the selected sequential unique number (active cell). The worksheet will be named whatever the active cell value is. Additionally, the new sheet will also have it's own "Delete" button that will delete the sheet and return the user to the History log tab. I am including my test sheet which is just a 20 column table of jibberish with a unique number in column A, which is randomly repeated the way I am picturing your History Table. If you are not using XL2BB then you may want to create your own test table. Please be sure to folllow the naming of table and worksheet as you posted in your post #5.

VBA Code:
Sub IndkeyInfoSub()

    Dim key As String
    Dim wsHL As Worksheet: Set wsHL = Worksheets("History Log")
    Dim wAs As Worksheet
    Dim tbl As ListObject: Set tbl = wsHL.ListObjects("HistoryLog")
    Dim i As Long, n As Long, r As Long
    Dim shp As Object
    Dim arr, arr2, hdr

    Application.ScreenUpdating = False
    If ActiveCell.Value = "" Or ActiveCell.Column <> 1 Then
        MsgBox "You must click on a unique key to look up!"
        Application.ScreenUpdating = True
        Exit Sub
    End If
    key = ActiveCell.Value
    arr = tbl.DataBodyRange.Resize(tbl.ListRows.Count, tbl.ListColumns.Count)
    ReDim arr2(1 To tbl.ListRows.Count, 1 To tbl.ListColumns.Count)

'******************************************
'Create New Worksheet
'******************************************
    Sheets.Add.Name = key
    Set wAs = Worksheets(key)

'**************************************
'Copy & Paste key Details
'**************************************
    hdr = wsHL.Range("A1:T1")
    wAs.Range("A1:T1") = hdr

    n = 1
    For i = 1 To UBound(arr)
        If arr(i, 1) = key Then
            For r = 1 To UBound(arr, 2)
                arr2(n, r) = arr(i, r)
            Next
            n = n + 1
        End If
    Next
    wAs.Range("A2").Resize(UBound(arr2, 1), UBound(arr2, 2)) = arr2

'******************************************
'Create Command Button
'******************************************
    With wAs
        .Shapes.AddShape 62, 1100, 50, 120, 30
        .Shapes(1).Select
    End With
    Set shp = wAs.Shapes(1)
    With Selection
        .Name = "Delete Sheet Button"
        .OnAction = "DeleteSheet"
        .Characters.Text = "Delete Sheet"
        .Font.Color = RGB(100, 150, 175)
        .Font.Size = 16
        .HorizontalAlignment = xlCenter
        .Interior.Color = RGB(200, 200, 200)
    End With
    wAs.UsedRange.Select
ErrHandler:
    
    Range("A1").Select
    Application.ScreenUpdating = True

End Sub

Sub DeleteSheet()
    Application.DisplayAlerts = False
    ActiveSheet.Delete
    Application.DisplayAlerts = True
    Worksheets("History Log").Activate
End Sub

CreateSheet.xlsm
ABCDEFGHIJKLMNOPQRST
1Seq KeyColumn2Column3Column4Column5Column6Column7Column8Column9Column10Column11Column12Column13Column14Column15Column16Column17Column18Column19Column20
22A1B1C2D2E2F2G2H2I2J2K2L2M2N2O2P2Q2R2S2T2
33A1B2C3D3E3F3G3H3I3J3K3L3M3N3O3P3Q3R3S3T3
44A1B3C4D4E4F4G4H4I4J4K4L4M4N4O4P4Q4R4S4T4
55A1B4C5D5E5F5G5H5I5J5K5L5M5N5O5P5Q1R5S5T5
66A1B5C6D6E6F6G6H6I6J6K6L6M6N6O6P6Q2R6S6T6
72A1B6C7D7E7F7G7H7I7J7K7L7M7N7O7P7Q3R7S7T7
83A1B7C8D8E8F8G8H8I8J8K8L8M8N8O8P8Q4R8S8T8
94A1B8C9D9E9F9G9H9I9J9K9L9M9N9O9P9Q1R9S9T9
105A1B9C10D10E10F10G10H10I10J10K10L10M10N10O10P10Q2R10S10T10
116A1B10C11D11E11F11G11H11I11J11K11L11M11N11O11P11Q3R11S11T11
122A1B11C12D12E12F12G12H12I12J12K12L12M12N12O12P12Q4R12S12T12
133A1B12C13D13E13F13G13H13I13J13K13L13M13N13O13P13Q1R13S13T13
144A1B13C14D14E14F14G14H14I14J14K14L14M14N14O14P14Q2R14S14T14
155A1B14C15D15E15F15G15H15I15J15K15L15M15N15O15P15Q3R15S15T15
166A1B15C16D16E16F16G16H16I16J16K16L16M16N16O16P16Q4R16S16T16
172A1B16C17D17E17F17G17H17I17J17K17L17M17N17O17P17Q1R17S17T17
183A1B17C18D18E18F18G18H18I18J18K18L18M18N18O18P18Q2R18S18T18
194A1B18C19D19E19F19G19H19I19J19K19L19M19N19O19P19Q3R19S19T19
205A1B19C20D20E20F20G20H20I20J20K20L20M20N20O20P20Q4R20S20T20
216A1B20C21D21E21F21G21H21I21J21K21L21M21N21O21P21Q1R21S21T21
222A1B21C22D22E22F22G22H22I22J22K22L22M22N22O22P22Q2R22S22T22
233A1B22C23D23E23F23G23H23I23J23K23L23M23N23O23P23Q3R23S23T23
244A1B23C24D24E24F24G24H24I24J24K24L24M24N24O24P24Q4R24S24T24
255A1B24C25D25E25F25G25H25I25J25K25L25M25N25O25P25Q1R25S25T25
266A1B25C26D26E26F26G26H26I26J26K26L26M26N26O26P26Q2R26S26T26
272A1B26C27D27E27F27G27H27I27J27K27L27M27N27O27P27Q3R27S27T27
283A1B27C28D28E28F28G28H28I28J28K28L28M28N28O28P28Q4R28S28T28
294A1B28C29D29E29F29G29H29I29J29K29L29M29N29O29P29Q1R29S29T29
305A1B29C30D30E30F30G30H30I30J30K30L30M30N30O30P30Q2R30S30T30
316A1B30C31D31E31F31G31H31I31J31K31L31M31N31O31P31Q3R31S31T31
322A1B31C32D32E32F32G32H32I32J32K32L32M32N32O32P32Q4R32S32T32
333A1B32C33D33E33F33G33H33I33J33K33L33M33N33O33P33Q1R33S33T33
344A1B33C34D34E34F34G34H34I34J34K34L34M34N34O34P34Q2R34S34T34
355A1B34C35D35E35F35G35H35I35J35K35L35M35N35O35P35Q3R35S35T35
History Log
 
Upvote 0
This is not exactly what you asked for- a userform with a listbox. What this will do is add a new sheet to your workbook which is populated with the data from the History Log Table filtered by the selected sequential unique number (active cell). The worksheet will be named whatever the active cell value is. Additionally, the new sheet will also have it's own "Delete" button that will delete the sheet and return the user to the History log tab. I am including my test sheet which is just a 20 column table of jibberish with a unique number in column A, which is randomly repeated the way I am picturing your History Table. If you are not using XL2BB then you may want to create your own test table. Please be sure to folllow the naming of table and worksheet as you posted in your post #5.

VBA Code:
Sub IndkeyInfoSub()

    Dim key As String
    Dim wsHL As Worksheet: Set wsHL = Worksheets("History Log")
    Dim wAs As Worksheet
    Dim tbl As ListObject: Set tbl = wsHL.ListObjects("HistoryLog")
    Dim i As Long, n As Long, r As Long
    Dim shp As Object
    Dim arr, arr2, hdr

    Application.ScreenUpdating = False
    If ActiveCell.Value = "" Or ActiveCell.Column <> 1 Then
        MsgBox "You must click on a unique key to look up!"
        Application.ScreenUpdating = True
        Exit Sub
    End If
    key = ActiveCell.Value
    arr = tbl.DataBodyRange.Resize(tbl.ListRows.Count, tbl.ListColumns.Count)
    ReDim arr2(1 To tbl.ListRows.Count, 1 To tbl.ListColumns.Count)

'******************************************
'Create New Worksheet
'******************************************
    Sheets.Add.Name = key
    Set wAs = Worksheets(key)

'**************************************
'Copy & Paste key Details
'**************************************
    hdr = wsHL.Range("A1:T1")
    wAs.Range("A1:T1") = hdr

    n = 1
    For i = 1 To UBound(arr)
        If arr(i, 1) = key Then
            For r = 1 To UBound(arr, 2)
                arr2(n, r) = arr(i, r)
            Next
            n = n + 1
        End If
    Next
    wAs.Range("A2").Resize(UBound(arr2, 1), UBound(arr2, 2)) = arr2

'******************************************
'Create Command Button
'******************************************
    With wAs
        .Shapes.AddShape 62, 1100, 50, 120, 30
        .Shapes(1).Select
    End With
    Set shp = wAs.Shapes(1)
    With Selection
        .Name = "Delete Sheet Button"
        .OnAction = "DeleteSheet"
        .Characters.Text = "Delete Sheet"
        .Font.Color = RGB(100, 150, 175)
        .Font.Size = 16
        .HorizontalAlignment = xlCenter
        .Interior.Color = RGB(200, 200, 200)
    End With
    wAs.UsedRange.Select
ErrHandler:
   
    Range("A1").Select
    Application.ScreenUpdating = True

End Sub

Sub DeleteSheet()
    Application.DisplayAlerts = False
    ActiveSheet.Delete
    Application.DisplayAlerts = True
    Worksheets("History Log").Activate
End Sub

CreateSheet.xlsm
ABCDEFGHIJKLMNOPQRST
1Seq KeyColumn2Column3Column4Column5Column6Column7Column8Column9Column10Column11Column12Column13Column14Column15Column16Column17Column18Column19Column20
22A1B1C2D2E2F2G2H2I2J2K2L2M2N2O2P2Q2R2S2T2
33A1B2C3D3E3F3G3H3I3J3K3L3M3N3O3P3Q3R3S3T3
44A1B3C4D4E4F4G4H4I4J4K4L4M4N4O4P4Q4R4S4T4
55A1B4C5D5E5F5G5H5I5J5K5L5M5N5O5P5Q1R5S5T5
66A1B5C6D6E6F6G6H6I6J6K6L6M6N6O6P6Q2R6S6T6
72A1B6C7D7E7F7G7H7I7J7K7L7M7N7O7P7Q3R7S7T7
83A1B7C8D8E8F8G8H8I8J8K8L8M8N8O8P8Q4R8S8T8
94A1B8C9D9E9F9G9H9I9J9K9L9M9N9O9P9Q1R9S9T9
105A1B9C10D10E10F10G10H10I10J10K10L10M10N10O10P10Q2R10S10T10
116A1B10C11D11E11F11G11H11I11J11K11L11M11N11O11P11Q3R11S11T11
122A1B11C12D12E12F12G12H12I12J12K12L12M12N12O12P12Q4R12S12T12
133A1B12C13D13E13F13G13H13I13J13K13L13M13N13O13P13Q1R13S13T13
144A1B13C14D14E14F14G14H14I14J14K14L14M14N14O14P14Q2R14S14T14
155A1B14C15D15E15F15G15H15I15J15K15L15M15N15O15P15Q3R15S15T15
166A1B15C16D16E16F16G16H16I16J16K16L16M16N16O16P16Q4R16S16T16
172A1B16C17D17E17F17G17H17I17J17K17L17M17N17O17P17Q1R17S17T17
183A1B17C18D18E18F18G18H18I18J18K18L18M18N18O18P18Q2R18S18T18
194A1B18C19D19E19F19G19H19I19J19K19L19M19N19O19P19Q3R19S19T19
205A1B19C20D20E20F20G20H20I20J20K20L20M20N20O20P20Q4R20S20T20
216A1B20C21D21E21F21G21H21I21J21K21L21M21N21O21P21Q1R21S21T21
222A1B21C22D22E22F22G22H22I22J22K22L22M22N22O22P22Q2R22S22T22
233A1B22C23D23E23F23G23H23I23J23K23L23M23N23O23P23Q3R23S23T23
244A1B23C24D24E24F24G24H24I24J24K24L24M24N24O24P24Q4R24S24T24
255A1B24C25D25E25F25G25H25I25J25K25L25M25N25O25P25Q1R25S25T25
266A1B25C26D26E26F26G26H26I26J26K26L26M26N26O26P26Q2R26S26T26
272A1B26C27D27E27F27G27H27I27J27K27L27M27N27O27P27Q3R27S27T27
283A1B27C28D28E28F28G28H28I28J28K28L28M28N28O28P28Q4R28S28T28
294A1B28C29D29E29F29G29H29I29J29K29L29M29N29O29P29Q1R29S29T29
305A1B29C30D30E30F30G30H30I30J30K30L30M30N30O30P30Q2R30S30T30
316A1B30C31D31E31F31G31H31I31J31K31L31M31N31O31P31Q3R31S31T31
322A1B31C32D32E32F32G32H32I32J32K32L32M32N32O32P32Q4R32S32T32
333A1B32C33D33E33F33G33H33I33J33K33L33M33N33O33P33Q1R33S33T33
344A1B33C34D34E34F34G34H34I34J34K34L34M34N34O34P34Q2R34S34T34
355A1B34C35D35E35F35G35H35I35J35K35L35M35N35O35P35Q3R35S35T35
History Log
Thank you …

Won’t be able to try until Wednesday, but will let you know how I get on then …
 
Upvote 0
This is not exactly what you asked for- a userform with a listbox. What this will do is add a new sheet to your workbook which is populated with the data from the History Log Table filtered by the selected sequential unique number (active cell). The worksheet will be named whatever the active cell value is. Additionally, the new sheet will also have it's own "Delete" button that will delete the sheet and return the user to the History log tab. I am including my test sheet which is just a 20 column table of jibberish with a unique number in column A, which is randomly repeated the way I am picturing your History Table. If you are not using XL2BB then you may want to create your own test table. Please be sure to folllow the naming of table and worksheet as you posted in your post #5.

VBA Code:
Sub IndkeyInfoSub()

    Dim key As String
    Dim wsHL As Worksheet: Set wsHL = Worksheets("History Log")
    Dim wAs As Worksheet
    Dim tbl As ListObject: Set tbl = wsHL.ListObjects("HistoryLog")
    Dim i As Long, n As Long, r As Long
    Dim shp As Object
    Dim arr, arr2, hdr

    Application.ScreenUpdating = False
    If ActiveCell.Value = "" Or ActiveCell.Column <> 1 Then
        MsgBox "You must click on a unique key to look up!"
        Application.ScreenUpdating = True
        Exit Sub
    End If
    key = ActiveCell.Value
    arr = tbl.DataBodyRange.Resize(tbl.ListRows.Count, tbl.ListColumns.Count)
    ReDim arr2(1 To tbl.ListRows.Count, 1 To tbl.ListColumns.Count)

'******************************************
'Create New Worksheet
'******************************************
    Sheets.Add.Name = key
    Set wAs = Worksheets(key)

'**************************************
'Copy & Paste key Details
'**************************************
    hdr = wsHL.Range("A1:T1")
    wAs.Range("A1:T1") = hdr

    n = 1
    For i = 1 To UBound(arr)
        If arr(i, 1) = key Then
            For r = 1 To UBound(arr, 2)
                arr2(n, r) = arr(i, r)
            Next
            n = n + 1
        End If
    Next
    wAs.Range("A2").Resize(UBound(arr2, 1), UBound(arr2, 2)) = arr2

'******************************************
'Create Command Button
'******************************************
    With wAs
        .Shapes.AddShape 62, 1100, 50, 120, 30
        .Shapes(1).Select
    End With
    Set shp = wAs.Shapes(1)
    With Selection
        .Name = "Delete Sheet Button"
        .OnAction = "DeleteSheet"
        .Characters.Text = "Delete Sheet"
        .Font.Color = RGB(100, 150, 175)
        .Font.Size = 16
        .HorizontalAlignment = xlCenter
        .Interior.Color = RGB(200, 200, 200)
    End With
    wAs.UsedRange.Select
ErrHandler:
   
    Range("A1").Select
    Application.ScreenUpdating = True

End Sub

Sub DeleteSheet()
    Application.DisplayAlerts = False
    ActiveSheet.Delete
    Application.DisplayAlerts = True
    Worksheets("History Log").Activate
End Sub

CreateSheet.xlsm
ABCDEFGHIJKLMNOPQRST
1Seq KeyColumn2Column3Column4Column5Column6Column7Column8Column9Column10Column11Column12Column13Column14Column15Column16Column17Column18Column19Column20
22A1B1C2D2E2F2G2H2I2J2K2L2M2N2O2P2Q2R2S2T2
33A1B2C3D3E3F3G3H3I3J3K3L3M3N3O3P3Q3R3S3T3
44A1B3C4D4E4F4G4H4I4J4K4L4M4N4O4P4Q4R4S4T4
55A1B4C5D5E5F5G5H5I5J5K5L5M5N5O5P5Q1R5S5T5
66A1B5C6D6E6F6G6H6I6J6K6L6M6N6O6P6Q2R6S6T6
72A1B6C7D7E7F7G7H7I7J7K7L7M7N7O7P7Q3R7S7T7
83A1B7C8D8E8F8G8H8I8J8K8L8M8N8O8P8Q4R8S8T8
94A1B8C9D9E9F9G9H9I9J9K9L9M9N9O9P9Q1R9S9T9
105A1B9C10D10E10F10G10H10I10J10K10L10M10N10O10P10Q2R10S10T10
116A1B10C11D11E11F11G11H11I11J11K11L11M11N11O11P11Q3R11S11T11
122A1B11C12D12E12F12G12H12I12J12K12L12M12N12O12P12Q4R12S12T12
133A1B12C13D13E13F13G13H13I13J13K13L13M13N13O13P13Q1R13S13T13
144A1B13C14D14E14F14G14H14I14J14K14L14M14N14O14P14Q2R14S14T14
155A1B14C15D15E15F15G15H15I15J15K15L15M15N15O15P15Q3R15S15T15
166A1B15C16D16E16F16G16H16I16J16K16L16M16N16O16P16Q4R16S16T16
172A1B16C17D17E17F17G17H17I17J17K17L17M17N17O17P17Q1R17S17T17
183A1B17C18D18E18F18G18H18I18J18K18L18M18N18O18P18Q2R18S18T18
194A1B18C19D19E19F19G19H19I19J19K19L19M19N19O19P19Q3R19S19T19
205A1B19C20D20E20F20G20H20I20J20K20L20M20N20O20P20Q4R20S20T20
216A1B20C21D21E21F21G21H21I21J21K21L21M21N21O21P21Q1R21S21T21
222A1B21C22D22E22F22G22H22I22J22K22L22M22N22O22P22Q2R22S22T22
233A1B22C23D23E23F23G23H23I23J23K23L23M23N23O23P23Q3R23S23T23
244A1B23C24D24E24F24G24H24I24J24K24L24M24N24O24P24Q4R24S24T24
255A1B24C25D25E25F25G25H25I25J25K25L25M25N25O25P25Q1R25S25T25
266A1B25C26D26E26F26G26H26I26J26K26L26M26N26O26P26Q2R26S26T26
272A1B26C27D27E27F27G27H27I27J27K27L27M27N27O27P27Q3R27S27T27
283A1B27C28D28E28F28G28H28I28J28K28L28M28N28O28P28Q4R28S28T28
294A1B28C29D29E29F29G29H29I29J29K29L29M29N29O29P29Q1R29S29T29
305A1B29C30D30E30F30G30H30I30J30K30L30M30N30O30P30Q2R30S30T30
316A1B30C31D31E31F31G31H31I31J31K31L31M31N31O31P31Q3R31S31T31
322A1B31C32D32E32F32G32H32I32J32K32L32M32N32O32P32Q4R32S32T32
333A1B32C33D33E33F33G33H33I33J33K33L33M33N33O33P33Q1R33S33T33
344A1B33C34D34E34F34G34H34I34J34K34L34M34N34O34P34Q2R34S34T34
355A1B34C35D35E35F35G35H35I35J35K35L35M35N35O35P35Q3R35S35T35
History Log
@igold

Many thanks again for taking the trouble to reply to my post ...

As you say, not exactly what I asked for, but it got me thinking!

And the result is a UserForm with a ListBox and a CommandButton driven by the following code (it is called from another UserForm that has already checked that a KEY has been selected as the ActiveCell) - it works a treat!

NB; I know there are a couple of redundant steps, but I wanted the code to read clearly for future eyes!

VBA Code:
Public SName As String

Private Sub UserForm_Initialize()

'Disable X on UserForm (use Close button to exit)

Call SystemButtonSettings(Me, False)

'Add temporary Worksheet AFTER last Worksheet (deleted when UserForm closed)

ACell = ActiveCell.value
CUser = Application.UserName
SName = ACell & " - " & CUser

Sheets.Add.Name = SName
Sheets(SName).Move After:=Sheets(Sheets.Count)

'Copy History Log table to temporary Worksheet

Sheets("History Log").ListObjects("HistoryLog").Range.Copy _
Destination:=Sheets(SName).Range("A1")

'Rename table on temporary Worksheet

Sheets(SName).ListObjects(1).Name = "HistoryLogFiltered"

'Filter on AND delete rows where Inventory ID NOT = selected KEY

With Sheets(SName)
    With .ListObjects("HistoryLogFiltered").DataBodyRange
        .AutoFilter
        .AutoFilter Field:=3, Criteria1:="<>" & ACell
        .EntireRow.Delete
        .AutoFilter
    End With
End With

'Temporary Worksheet = ActiveSheet

Sheets(SName).Select

'Set up and display ListBox with history for selected KEY ONLY

Dim wsSName As Worksheet
Dim rnghlf As Range

Set wsSName = Sheets(SName)
Set rnghlf = wsSName.Range("HistoryLogFiltered")

cols = Sheets(SName).Cells(1, Columns.Count).End(xlToLeft).Column

With ListBox1
    .ColumnCount = cols
    .ColumnHeads = True
    .RowSource = rnghlf.Address
End With

End Sub


Private Sub cmdClose_Click()

Application.DisplayAlerts = False

'Delete temporary Worksheet

Sheets(SName).Delete

Application.DisplayAlerts = True

'"All Devices" Worksheet = ActiveSheet (ActiveCell = selected KEY)

Worksheets("All Devices").Activate

Unload Me

End Sub
 
Upvote 0
You're welcome, I am glad that you were able to get something that works for you, that was the ultimate goal. Thanks for the feedback!
 
Upvote 0

Forum statistics

Threads
1,216,082
Messages
6,128,717
Members
449,465
Latest member
TAKLAM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top