View Single Post
 
Old 09-18-2012, 03:26 PM
jperez84 jperez84 is offline Windows XP Office 2007
Novice
 
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