LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default User defined date entry into message box?

One thing, because you expect a Date variable back, you do not use the "Set"
key owrd ; that is only for Object.
Dim TodaysDate as Date

Also, if you actually want today's date, you do not need to ask the user ;
you have "Date", which returns today's date.
As for the last, that depends what you want to do...

NickHK

"Meltad" ...
Thanks Nick,

I've put this at the start of my macro...
Set TodaysDate = Application.InputBox(prompt:="Please enter today's date",
Type:=1)
How do I ensure a date is accepted and recognised later in the code?
How can I now use 'TodaysDate' to copy relevant rows from my spreadsheets?


"NickHK" wrote:

Look at Application.InputBox in help

NickHK

"Meltad" ...

Hi all,

Can I start my macro with a message box/prompt for the user to enter
the
date and set this as 'todaysdate' (or something!) - I would then use
this
user defined date to go into 3 other workbooks, select all data for
that
date, copy the rows and paste into the original workbook.
Is this possible?!

Thank you!






 
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
Excel Message "user defined type not defined" LEELK01 Excel Discussion (Misc queries) 2 August 14th 09 07:31 AM
How to tell which fiscal qtr a user defined date falls in, excel jwmott Excel Programming 2 October 25th 05 01:26 PM
"User-defined type not defined" message in Excel RW1946 Excel Discussion (Misc queries) 0 August 31st 05 12:14 PM
user defined date [email protected] Excel Worksheet Functions 1 January 21st 05 08:57 PM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM


All times are GMT +1. The time now is 08:27 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"