Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?
Save up to 50% on our desktop apps during our Year End Sale!Save up to 50% on our desktop apps during our Year End Sale, including DisplayFusion, ClipboardFusion, FileSeek, LogFusion, TrayStatus, and VoiceBot!Save up to 50% on our desktop apps during our Year End Sale!

Increment Value

Description
Takes a numeric or date value and increments it. Numeric values are incremented by 1. Date values are incremented by a single day.
Language
VB.net
Minimum Version
Created By
wooster11
Contributors
-
Date Created
Aug 19, 2014
Date Last Modified
Mar 17, 2022

Macro Code

Imports System
Imports System.Windows.Forms
Imports Microsoft.VisualBasic

Public Class ClipboardFusionHelper

    Public Shared Function ProcessText(text As String) As String
        BFS.Clipboard.PasteText(text)
        If IsNumeric(text) Then
          Dim x As Double = CDbl(text)
         x += 1
         text = x.ToString()
        ElseIf IsDate(text) Then
          Dim x As DateTime
         x = CDate(text)
         x = x.AddDays(1.0)
         text = x.ToString("yyyy-MM-dd HH:mm:ss")
        Else
          MessageBox.Show("Clipboard text is invalid. It must be numeric or a date", "Increment Value", MessageBoxButtons.OK, MessageBoxIcon.Information)
        End If

        Return text
    End Function

End Class