Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel AddCode in worksheet
#1
I tried:

Macro Macro43
Code:
Copy      Help
ExcelSheet es.Init
str strCode =
;Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
;'Update 20140318
;Static xRow
;Static xColumn
;If xColumn <> "" Then
;;;;;With Columns(xColumn).Interior
;;;;;;;;;.ColorIndex = xlNone
;;;;;End With
;;;;;With Rows(xRow).Interior
;;;;;;;;;.ColorIndex = xlNone
;;;;;End With
;End If
;pRow = Selection.Row
;pColumn = Selection.Column
;xRow = pRow
;xColumn = pColumn
;With Columns(pColumn).Interior
;;;;;.ColorIndex = 20
;;;;;.Pattern = xlSolid
;End With
;With Rows(pRow).Interior
;;;;;.ColorIndex = 20
;;;;;.Pattern = xlSolid
;End With
;End Sub

es.AddCode(strCode)

but it doesn't work.

Is possible to insert the code in Worksheet or ThisWorkbook module?


Messages In This Thread
Excel AddCode in worksheet - by Lucas - 05-04-2018, 07:11 PM
RE: Excel AddCode in worksheet - by Lucas - 05-07-2018, 06:06 AM
RE: Excel AddCode in worksheet - by Gintaras - 05-07-2018, 05:17 PM
RE: Excel AddCode in worksheet - by Lucas - 05-07-2018, 07:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)