Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hey there. Here is what I would like to do. I am using Excel 2000. would like to add a command button to my Excel form that, when pressed will add 56 days to a cell on my spread sheet. I'm sure this is rathe simple for you guys, but I really have no clue and it would be a hug help for me if you could send me the code. Thanks so much in advance -- haze ----------------------------------------------------------------------- hazey's Profile: http://www.excelforum.com/member.php...fo&userid=2956 View this thread: http://www.excelforum.com/showthread.php?threadid=49263 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try:
Private Sub cmdAddDays_Click() With Sheets("Sheet1").Range("A1") If IsDate(.Value) Then .Value = .Value + 56 End If End With End Sub Hope this helps Rowan hazey wrote: Hey there. Here is what I would like to do. I am using Excel 2000. I would like to add a command button to my Excel form that, when pressed, will add 56 days to a cell on my spread sheet. I'm sure this is rather simple for you guys, but I really have no clue and it would be a huge help for me if you could send me the code. Thanks so much in advance. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello Hazy, Here is a code example using A1 as the cell with the date of Oct, 15 2005. The result of adding 56 days will yield Dec 10, 2005. CODE EXAMPLE: With Worksheets("Sheet1") Range("A1").Value = .Range("A1").Value + 56 End With Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=492633 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Awesome, thanks a lot you guys! Works perfectly! -- hazey ------------------------------------------------------------------------ hazey's Profile: http://www.excelforum.com/member.php...o&userid=29561 View this thread: http://www.excelforum.com/showthread...hreadid=492633 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're welcome.
hazey wrote: Awesome, thanks a lot you guys! Works perfectly! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can i use a command button to validate date and time | Excel Discussion (Misc queries) | |||
adding a command button to an excel cell? | Excel Discussion (Misc queries) | |||
Adding Code to an Existing Command Button with VBA | Excel Programming | |||
Adding a control button to insert a date in the active cell. | Excel Discussion (Misc queries) | |||
Adding a command button | Excel Programming |