Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 09-18-2012, 03:26 PM
jperez84 jperez84 is offline Macro that can find phrase and then find another and copy Windows XP Macro that can find phrase and then find another and copy Office 2007
Novice
Macro that can find phrase and then find another and copy
 
Join Date: Sep 2012
Posts: 21
jperez84 is on a distinguished road
Default

Hey Macropod,

This macro also isn't working for me. it goes through the process but Excel never opens. You said that it's easier if I already have an Excel doc open. Can we modify the current macro? Also, I'm trying to learn the coding aspect and have some other ideas for the macro. I'm thinking of making it find additional lines of text. Is the code below correct?

Code:
StrSec = InputBox("What is the Third Text Array to Find?" _
  & vbCr & "Use the '|' character to separate array elements.")
If Trim(StrThrd) = "" Then Exit Sub
Code:
If InStr(.Text, Split(StrPri, "|")(k)) > 0 Then
          For j = 0 To UBound(Split(StrThrd, "|"))
            If InStr(.Text, Split(StrThrd, "|")(k)) > 0 Then
              'Extract the text on the third string's line
              StrTmp = Split(.Text, Split(StrThrd, "|")(k))(1)
              StrTmp = Split(StrTmp, vbCr)(0)
              StrOut = StrOut & vbCr & StrTmp
            End If
          Next
          Exit For
        End If
I don't know how to do the Excel portion though. Also, If instead of an input box we can have it read from a list I think that would work better.

Thanks for your help.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro that can find phrase and then find another and copy Find, copy and paste into a new page jperez84 Word VBA 24 09-20-2012 11:34 AM
Trying to find and copy all headings at the same time WaltR Word 7 08-21-2012 03:12 PM
Macro that can find phrase and then find another and copy How to find exact phrase CabbageTree Outlook 2 05-14-2012 11:24 AM
Macro that can find phrase and then find another and copy Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM
Find and Replace Macro - A Better Way Tribos Word VBA 0 10-08-2008 03:22 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:16 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft