J
Joe Wildman
Hello all, for cell C6 thru C16, i have it set to = C35, I linked the text
box object to C8 in propertys (and it works, i see the text in C8) the
problem is i have to double click on C8 to get the text to populate into C35,
how do i get this to auto populate with out doing that?
1. copy and paste code below into excel
2. go to cell cell C7 and type in anything,
3. go to cell C35 and you will see a template popup up, expand to see it all
4. Create a text box object
5. link cell C8 to the text box
6. type something in the text box object
7. you will see text in C8 cell but does not show up in C35
8. double click on cell C8 and then you will see the text show up in C35
Question, how do i get the text to show up with out double clicking on Cell
C8?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim X As Long
Dim Colon As Long
Dim LineFeed As Long
Dim LineStart As Long
If Not Intersect(Target, Range("C6:C16:K16:E14")) Is Nothing Then
With Range("C35")
On Error GoTo Whoops
Application.EnableEvents = False
..Value = "State: " & Range("C6").Value & vbLf & _
"xxxxx: " & Range("C7").Value & vbLf & _
"Date/Time: " & Range("C8") & " " & Range("F8").Value & vbLf & _
"xxxxx: " & Range("C9").Value & vbLf & _
"xxxxxx: " & Range("C10").Value & vbLf & _
"xxxxx: " & Range("C11").Value & vbLf & _
"xxxxx: " & Range("C12").Value & vbLf & _
"xxxxx: " & Range("C13").Value & vbLf & _
"xxxxxx: " & Range("C14") & " " & Range("E14").Value & vbLf & _
"xxxxx: " & Range("C15").Value & vbLf & _
"xxxxxxx: " & Range("C16") & " " & Range("K16").Value
..Font.ColorIndex = 0
LineStart = 1
Do
Colon = InStr(LineStart, .Value, ":")
LineFeed = InStr(LineStart, .Value & vbLf, vbLf)
..Characters(LineStart, Colon - LineStart + 1).Font.ColorIndex = 1
..Characters(Colon + 1, LineFeed - Colon + 2).Font.ColorIndex = 5
LineStart = LineFeed + 1
Loop While LineFeed < Len(.Value)
End With
End If
Whoops:
Application.EnableEvents = True
End Sub
box object to C8 in propertys (and it works, i see the text in C8) the
problem is i have to double click on C8 to get the text to populate into C35,
how do i get this to auto populate with out doing that?
1. copy and paste code below into excel
2. go to cell cell C7 and type in anything,
3. go to cell C35 and you will see a template popup up, expand to see it all
4. Create a text box object
5. link cell C8 to the text box
6. type something in the text box object
7. you will see text in C8 cell but does not show up in C35
8. double click on cell C8 and then you will see the text show up in C35
Question, how do i get the text to show up with out double clicking on Cell
C8?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim X As Long
Dim Colon As Long
Dim LineFeed As Long
Dim LineStart As Long
If Not Intersect(Target, Range("C6:C16:K16:E14")) Is Nothing Then
With Range("C35")
On Error GoTo Whoops
Application.EnableEvents = False
..Value = "State: " & Range("C6").Value & vbLf & _
"xxxxx: " & Range("C7").Value & vbLf & _
"Date/Time: " & Range("C8") & " " & Range("F8").Value & vbLf & _
"xxxxx: " & Range("C9").Value & vbLf & _
"xxxxxx: " & Range("C10").Value & vbLf & _
"xxxxx: " & Range("C11").Value & vbLf & _
"xxxxx: " & Range("C12").Value & vbLf & _
"xxxxx: " & Range("C13").Value & vbLf & _
"xxxxxx: " & Range("C14") & " " & Range("E14").Value & vbLf & _
"xxxxx: " & Range("C15").Value & vbLf & _
"xxxxxxx: " & Range("C16") & " " & Range("K16").Value
..Font.ColorIndex = 0
LineStart = 1
Do
Colon = InStr(LineStart, .Value, ":")
LineFeed = InStr(LineStart, .Value & vbLf, vbLf)
..Characters(LineStart, Colon - LineStart + 1).Font.ColorIndex = 1
..Characters(Colon + 1, LineFeed - Colon + 2).Font.ColorIndex = 5
LineStart = LineFeed + 1
Loop While LineFeed < Len(.Value)
End With
End If
Whoops:
Application.EnableEvents = True
End Sub