Hi,
I am very new to VBA and have a simple question:
Say I want to take the value of whatever cell is currently active, and then put is as the value of another cell on a different sheet at a later point in time (I have some other code going in between, so I can't just copy / paste).
Example: User has a cell containing "apples" highlighted (let's say sheet 1 cell A1)
-> Other vba code runs, meaning the "apples" cell is no longer highlighted
Now I need to set Sheet 2 cell B3 equal to "apples".
I tried
Any suggestions? I know this is probably a simple question, but thank you for the help!
I am very new to VBA and have a simple question:
Say I want to take the value of whatever cell is currently active, and then put is as the value of another cell on a different sheet at a later point in time (I have some other code going in between, so I can't just copy / paste).
Example: User has a cell containing "apples" highlighted (let's say sheet 1 cell A1)
-> Other vba code runs, meaning the "apples" cell is no longer highlighted
Now I need to set Sheet 2 cell B3 equal to "apples".
I tried
Code:
Dim fruitselection as string
fruitselection = activecell.text
sheets(sheet1).range("B3").value = fruitselection
Any suggestions? I know this is probably a simple question, but thank you for the help!