PDA

View Full Version : Multiline Macro Value


HippyCraig
06-03-2010, 08:45 AM
Is there a way to read each line, one at a time, from a mutiline macro value.

I cant seem to find an example, any sample you can provide would be appreciated.

HippyCraig
06-03-2010, 08:50 AM
Forgot to mention I was trying to do this in VBScript

kinook
06-03-2010, 08:57 AM
See attached sample.

HippyCraig
06-03-2010, 10:41 AM
Great thanks for the help!!

HippyCraig
06-08-2010, 02:12 PM
I tried to modify each line but I am not getting anywhere, I tried the following:


'Set objSearchResults = Application.Macros(vbldMacroTemporary).Item("TMP_SEARCH_RESULTS")

'strLines = Split(objSearchResults.Value, vbCrLf)

'For Each strEachLine In strLines

' If strEachLine = "Somthing" then
' strEachLine = "SomethingDifferent"
' End if

'Next

'objSearchResults.Value = strLines


The main macro is not geting updated.

kinook
06-08-2010, 02:21 PM
Attached.

HippyCraig
06-08-2010, 02:36 PM
Thanks again!