LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default For Each Next woes

Good day!
I'm having difficulty with the proper syntax for the following operation:

Dim AskDate as Date
Dim Target as Variant

For Each Target in [B17:AK48]
AskDate = InputBox("Enter Date")
If Target = AskDate then
Target . Select
Exit For
Else
Endif
Next Target


Here is what I am trying to do. The user inputs a date, the macro searches
the defined array for that user-input date. If the date is found, the
selection becomes that particular cell. If the date is not found, the user
is prompted to enter a date in again. This process repeats until an input
date matches a date within the given array. I've messed with syntax for a
couple hours, so I'm wondering if someone would be kind enough to give me a
push in the right direction. Thank you for your time!

 
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 Woes Larry New Users to Excel 1 August 22nd 06 04:22 PM
Rowliner woes Kim K Excel Discussion (Misc queries) 2 August 4th 06 03:20 PM
Indexing Woes Rianne Excel Discussion (Misc queries) 5 July 11th 06 09:24 PM
Hyperlink Woes - Please Help Randy Excel Worksheet Functions 1 June 27th 06 02:07 PM
References woes WillRn Excel Programming 5 March 30th 05 10:41 PM


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