I have a vba code that highlights the row of an active cell. Private Sub…
Jump to turn (13)
- 1I have a vba code that highlights the row of an active cell. Private Sub Workshe
- 2I want to select another sheet named List2 and for the same row of the last acti
- 3how can i use the following, Dim activeRow As Integer 'Declare a variable to hol
- 4what is the vba code that responds to an an active sheet named List2
- 5i want to use work sheet open
- 6i want to run a vba code when a sheet is opened
- 7is there a vba code that starts Private Sub Worksheet Open
- 8I want to open sheet named List2 and automatically select the same cell that was
- 9I want a vba code that when “List2” sheet is opened the same cell that was activ
- 10how can i store the address of an active cell to an integer and when i open anot
- 11If want to store the address of an active cell as an integer . When I open a dif
- 12I am getting an error with this line of code, Cells(activeRow, activeCol).Select
- 13activeRow and activeColumn are variables that were stored in a previous sheet. h
- User
I have a vba code that highlights the row of an active cell. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim activeRow As Integer 'Declare a variable to hold the active row number Cells.Interior.ColorIndex = 0 'Reset all cells to no color Target.EntireRow.Interior.ColorIndex = 36 'Highlight active row End Sub
- Assistant
As an AI language model, I can see that the given code will highlight the row of an active cell with color index 36. Here is a breakdown of what each line of the code does:
- Private Sub Worksheet_SelectionChange(ByVal Target As Range): Defines a Worksheet_SelectionChange event-triggered subroutine that activates when the user changes the selection within the worksheet.