Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Using Spinbutton to change a date

I been looking but I cannot find out how to change a date in a textbox using a spinbutton. I appreciate your help on this matter.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Using Spinbutton to change a date

Make sure that you put a date string in the textbox on itiliaisation, and
this spin code will work it

Private Sub SpinButton1_SpinUp()
TextBox1.Text = Format(CDate(TextBox1.Text) + 1, "dd mmm yyyy")
End Sub

Private Sub SpinButton1_SpinDown()
TextBox1.Text = Format(CDate(TextBox1.Text) - 1, "dd mmm yyyy")
End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Gheezer" wrote in message
...
I been looking but I cannot find out how to change a date in a textbox

using a spinbutton. I appreciate your help on this matter.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Using Spinbutton to change a date

That did the trick. Thank you very much.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Using Spinbutton to change a date

You are more than welcome.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Gheezer" wrote in message
...
That did the trick. Thank you very much.



Reply
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
Substitute for OLE SpinButton? Daystrom Excel Discussion (Misc queries) 2 January 29th 09 09:10 PM
Spinbutton pcor New Users to Excel 2 November 6th 07 03:16 PM
Spinbutton Ben B Excel Discussion (Misc queries) 3 March 9th 06 11:38 AM
Spinbutton sorting civms47 Excel Programming 1 December 24th 03 01:10 PM
SpinButton Rounding Up Randal W. Hozeski Excel Programming 5 December 23rd 03 08:12 PM


All times are GMT +1. The time now is 05:09 PM.

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

About Us

"It's about Microsoft Excel"