Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

macro recorder for cut and paste type activities

  Asked By: Madhat    Date: Jan 03    Category: MS Office    Views: 848
  

I am very new to VB, having in the past used only the macro recorder
for cut and paste type activities, and have decided today to learn
it. I assigned myself a task and now have not the foggiest idea of
where to begin.

I have assigned myself the task of putting a Time Stamp in a cell next
to a selection when a checkbox on a different worksheet is selected.
I thought I might be able to do this with a function,
-IF(CellSelected,TimeStampHere,"")- , but was sadly and miserably
mistaken. If any one could point me in the right direction I would
appreciate it.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Julia Hughes     Answered On: Jan 03

Once you create the check box, remember to assign the link to a
cell in the sheet. I chose E1 for the example
(I normally hide this value behind the CheckBox, out of site.)
Right click/format/control tab/link cell

Here is the simple code to do what I think you want:
Sub CheckBox1_Click()
If Sheets("sheet2").Range("E1").Value = True Then
Sheets("sheet1").Range("A1").Value = Now()
Else
Sheets("sheet1").Range("A1").Value = Empty
End If
End Sub

 
Answer #2    Answered By: Scarlett Hughes     Answered On: Jan 03

I will tear this apart later and do a paint by numbars routine until I figure
it out.

 
Didn't find what you were looking for? Find more on macro recorder for cut and paste type activities Or get search suggestion and latest updates.




Tagged: