LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
max max is offline
external usenet poster
 
Posts: 12
Default Using DateAdd with a text string

I have a textbox that I am entering a date and want to do some date calculations on it

I have the following but my suspician is this is returning a strin

Startdate = Format(UserForm1.TextBox1, "dd-mm-yyyy 00:00:00"

I tried the following but it there is a Type Mismatc

Startdate = DateAdd(m, -1, Format(UserForm1.TextBox1, "dd-mm-yyyy 00:00:00")

Do I need to do something else so this can be manipulated using DateAdd metho

Max
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change 3 letter text string to a number string Pete Excel Discussion (Misc queries) 3 December 31st 07 07:47 PM
Dateadd function Dr. Maunuk Excel Discussion (Misc queries) 2 September 28th 07 07:32 AM
dateadd The BriGuy[_2_] Excel Discussion (Misc queries) 1 March 29th 07 06:51 PM
Using DateAdd Function with cell values loren.pottinger Excel Discussion (Misc queries) 3 August 30th 06 01:10 AM
DateAdd function Bill[_19_] Excel Programming 2 November 12th 03 07:07 PM


All times are GMT +1. The time now is 11:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"