I have a spreadsheet in which the user will enter data in Column A. Every time that data is entered, I need that data to be stored as a string "Asset" for additional steps. I cant get this to work:
Private Sub Worksheet_Change(ByVal Target As Range)
' Check if the changed cell is A1
Sheets("Cal & PM Initial Entry").Activate
If Not Intersect(Target, Me.Range("A:A")) Is Nothing Then
Asset = ActiveCell.Activate
MsgBox = Asset
End If
End Sub
What am I missing? Also, can I take that stored value in Asset across multiple Sub's ()? or is that value lost when I call another sub?
Private Sub Worksheet_Change(ByVal Target As Range)
' Check if the changed cell is A1
Sheets("Cal & PM Initial Entry").Activate
If Not Intersect(Target, Me.Range("A:A")) Is Nothing Then
Asset = ActiveCell.Activate
MsgBox = Asset
End If
End Sub
What am I missing? Also, can I take that stored value in Asset across multiple Sub's ()? or is that value lost when I call another sub?