Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Experts,
I have an xls worksheet in which users paste a date from another application. Once pasted, I want to increase the value by one day (in the same field). Is that possible? And if so, how? alex |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveCell.Value = ActiveCell.Value + 1
-- Regards, Tom Ogilvy "alex" wrote: Hello Experts, I have an xls worksheet in which users paste a date from another application. Once pasted, I want to increase the value by one day (in the same field). Is that possible? And if so, how? alex |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jul 13, 1:54 pm, Tom Ogilvy
wrote: ActiveCell.Value = ActiveCell.Value + 1 -- Regards, Tom Ogilvy "alex" wrote: Hello Experts, I have an xls worksheet in which users paste a date from another application. Once pasted, I want to increase the value by one day (in the same field). Is that possible? And if so, how? alex- Hide quoted text - - Show quoted text - thanks Tom for your response. I want to limit this function to only column B. How would I set that up, and what Sub would I use? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try it this way....
If ActiveCell.Column = 2 Then ActiveCell.Value = ActiveCell.Value + 1 Rick "alex" wrote in message ups.com... On Jul 13, 1:54 pm, Tom Ogilvy wrote: ActiveCell.Value = ActiveCell.Value + 1 -- Regards, Tom Ogilvy "alex" wrote: Hello Experts, I have an xls worksheet in which users paste a date from another application. Once pasted, I want to increase the value by one day (in the same field). Is that possible? And if so, how? alex- Hide quoted text - - Show quoted text - thanks Tom for your response. I want to limit this function to only column B. How would I set that up, and what Sub would I use? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jul 13, 3:20 pm, "Rick Rothstein \(MVP - VB\)"
wrote: Try it this way.... If ActiveCell.Column = 2 Then ActiveCell.Value = ActiveCell.Value + 1 Rick "alex" wrote in message ups.com... On Jul 13, 1:54 pm, Tom Ogilvy wrote: ActiveCell.Value = ActiveCell.Value + 1 -- Regards, Tom Ogilvy "alex" wrote: Hello Experts, I have an xls worksheet in which users paste a date from another application. Once pasted, I want to increase the value by one day (in the same field). Is that possible? And if so, how? alex- Hide quoted text - - Show quoted text - thanks Tom for your response. I want to limit this function to only column B. How would I set that up, and what Sub would I use?- Hide quoted text - - Show quoted text - Thanks Rick for your help. I also need to know what Sub you'd use, and if any arguments are required...unless I'm misunderstanding where to place the code. alex |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Rick for your help.
I also need to know what Sub you'd use, and if any arguments are required...unless I'm misunderstanding where to place the code. You can probably place it in the Worksheet Change event. Maybe like this... Private Sub Worksheet_Change(ByVal Target As Range) Dim CurrentEnableEventsStatus As Boolean CurrentEnableEventsStatus = Application.EnableEvents Application.EnableEvents = False If Target.Column = 2 Then Target.Value = Target.Value + 1 Application.EnableEvents = CurrentEnableEventsStatus End Sub Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|