![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
![]()
Your code works here, assuming that the text file in question is compatible with the search pattern e.g.
Name "John Smith" Age "27" Date of Birth "12/12/1993" would show you 12/12/1993 in the message box.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#2
|
|||
|
|||
![]()
This is the following structure of the original txt file:
Quote:
Quote:
Another observation 2. for Eg if WhatToFind ="Name" then its First Record will show the Value of Age =13 rather than "Tom" if WhatToFind ="Age" then its First Record will show the Value of Date 27/12/1993 SamD |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Declare wBk as workbook. Set wBk = workbooks("NewBook.xls") gives error: Subscript out of range. | Syed Shabbir | Excel Programming | 1 | 09-27-2020 09:35 AM |
![]() |
raghugada | Word | 6 | 05-30-2017 02:09 PM |
Runtime error '9': Subscript out of Range | KingoftheKassel | Excel Programming | 1 | 06-13-2016 08:00 PM |
VBA Conditional Formatting Error (Subscript out of Range)) | tinfanide | Excel Programming | 1 | 05-15-2015 08:12 AM |
![]() |
KHTAY | Excel | 6 | 03-28-2009 11:18 PM |