Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code string for button
Hi,
I have a command button called Compare and I would like it to do the following when pressed; 1) Compare the date in cell h2 on sheet1 to today's date, if the date is older than todays date, copy data in cells h7:h12 to j7-j12 on sheet2. 2) I would then like the date in cell h2 on sheet1 to change to todays date. Thanks for any help with this, Newbeetle -- This post was created using recycled electrons! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code string for button
hi
Private Sub CommandButton1_Click() If Sheets("sheet1").Range("H2").Value < Date Then Sheets("sheet1").Range("H7:H12").Copy _ Destination:=Sheets("sheet2").Range("J7:J12") Sheets("sheet1").Range("H2").Value = Date Else MsgBox "no go" Exit Sub End If End Sub regards FSt1 "Newbeetle" wrote: Hi, I have a command button called Compare and I would like it to do the following when pressed; 1) Compare the date in cell h2 on sheet1 to today's date, if the date is older than todays date, copy data in cells h7:h12 to j7-j12 on sheet2. 2) I would then like the date in cell h2 on sheet1 to change to todays date. Thanks for any help with this, Newbeetle -- This post was created using recycled electrons! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code string for button
Wow that was quick, thankyou so much.
Have a good weekend. Regards Newbeetle -- This post was created using recycled electrons! "FSt1" wrote: hi Private Sub CommandButton1_Click() If Sheets("sheet1").Range("H2").Value < Date Then Sheets("sheet1").Range("H7:H12").Copy _ Destination:=Sheets("sheet2").Range("J7:J12") Sheets("sheet1").Range("H2").Value = Date Else MsgBox "no go" Exit Sub End If End Sub regards FSt1 "Newbeetle" wrote: Hi, I have a command button called Compare and I would like it to do the following when pressed; 1) Compare the date in cell h2 on sheet1 to today's date, if the date is older than todays date, copy data in cells h7:h12 to j7-j12 on sheet2. 2) I would then like the date in cell h2 on sheet1 to change to todays date. Thanks for any help with this, Newbeetle -- This post was created using recycled electrons! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code string for button
thanks for the feedback
regards FSt1 "Newbeetle" wrote: Wow that was quick, thankyou so much. Have a good weekend. Regards Newbeetle -- This post was created using recycled electrons! "FSt1" wrote: hi Private Sub CommandButton1_Click() If Sheets("sheet1").Range("H2").Value < Date Then Sheets("sheet1").Range("H7:H12").Copy _ Destination:=Sheets("sheet2").Range("J7:J12") Sheets("sheet1").Range("H2").Value = Date Else MsgBox "no go" Exit Sub End If End Sub regards FSt1 "Newbeetle" wrote: Hi, I have a command button called Compare and I would like it to do the following when pressed; 1) Compare the date in cell h2 on sheet1 to today's date, if the date is older than todays date, copy data in cells h7:h12 to j7-j12 on sheet2. 2) I would then like the date in cell h2 on sheet1 to change to todays date. Thanks for any help with this, Newbeetle -- This post was created using recycled electrons! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
string contra VBA code | Excel Worksheet Functions | |||
How to assign same code inside Option button code space ?? | Excel Programming | |||
How to make a button VBA code reference other VBA code subroutines??? | Excel Programming | |||
String to code | Excel Programming | |||
Select option button when have the name as a string | Excel Programming |