Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Input Box within a macro

I would like a box to pop up while running a macro that will prompt the user
for a date or number and then take that date or number entered and place in a
specific cell on the spreadsheet.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Input Box within a macro

This does not validate the input but if you need validation just reply back...

Range("A1").Value = InputBox("Enter Something")
--
HTH...

Jim Thomlinson


"McCloudK" wrote:

I would like a box to pop up while running a macro that will prompt the user
for a date or number and then take that date or number entered and place in a
specific cell on the spreadsheet.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Input Box within a macro

Jim - couple of weeks old this post but I'm looking for the validation that
you mention :-)

I've got a userform so admin staff can enter employee details and part of
that is start/finish date. I wanted to cheat really and try and get Excel to
validate the date entered for me, rather than have to type the code, and to
that extent I've tried using DateSerial to create a date with no luck.

I was thinking about putting the date into a cell on a hidden worksheet to
validate it but it seems a little "clunky" to me. Is this the best way for me
to validate the dates entered unless I write out some lengthy validation code?

Thanks
George

McCloudK - hope you don't mind me pinching the post :-)

"Jim Thomlinson" wrote:

This does not validate the input but if you need validation just reply back...

Range("A1").Value = InputBox("Enter Something")
--
HTH...

Jim Thomlinson


"McCloudK" wrote:

I would like a box to pop up while running a macro that will prompt the user
for a date or number and then take that date or number entered and place in a
specific cell on the spreadsheet.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Input Box within a macro

Aha! If anyone reads this not to worry, I've managed to find the answer after
a little more digging around in this usergroup.

By using a combination of string concatenation and the IsDate() function
I've found the answer :-)

Thanks for anyone who thought about this though!

"George" wrote:

Jim - couple of weeks old this post but I'm looking for the validation that
you mention :-)

I've got a userform so admin staff can enter employee details and part of
that is start/finish date. I wanted to cheat really and try and get Excel to
validate the date entered for me, rather than have to type the code, and to
that extent I've tried using DateSerial to create a date with no luck.

I was thinking about putting the date into a cell on a hidden worksheet to
validate it but it seems a little "clunky" to me. Is this the best way for me
to validate the dates entered unless I write out some lengthy validation code?

Thanks
George

McCloudK - hope you don't mind me pinching the post :-)

"Jim Thomlinson" wrote:

This does not validate the input but if you need validation just reply back...

Range("A1").Value = InputBox("Enter Something")
--
HTH...

Jim Thomlinson


"McCloudK" wrote:

I would like a box to pop up while running a macro that will prompt the user
for a date or number and then take that date or number entered and place in a
specific cell on the spreadsheet.

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
How do I set a goalseek value via an input box using vba macro TJK Excel Worksheet Functions 1 August 23rd 07 09:18 PM
Macro Data Input rbiggs Excel Discussion (Misc queries) 10 December 10th 06 11:09 PM
input box within macro Drummy Excel Worksheet Functions 1 June 7th 06 09:38 AM
Waiting for Input in a macro dhatul Excel Discussion (Misc queries) 1 January 19th 06 06:28 AM
Having a Macro Prompt Me For Input carl Excel Worksheet Functions 3 January 13th 06 02:24 PM


All times are GMT +1. The time now is 02:10 AM.

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"