Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Thanks for the ideas - I'm trying to understand them!! I'm not tha expert at VBA programming at all, but I'm learning fast!! I think the code you gave me may not work as I am writing commands fo a communication interface that has a set type library. An example of the code follows: Dim RetVal ' Implicitly a Variant. Dim form, oldtext, text, counter Set RetVal = CreateObject("monitor.verbatim") RetVal.DetailMonitor = 1 RetVal.RangeFrom = "1ST04" RetVal.RangeTo = "1ST04" RetVal.MonthNo = "1" RetVal.Source = 3 ' Product RetVal.SourceName = "Avandamet" RetVal.PComment = 1 RetVal.MComment = 1 ' 1 = true RetVal.NComment = 1 RetVal.OComment = 1 RetVal.Extract After this is a section of code to do with formatting the data i Excel, plus repetitions of similar code extracting slightly differen data. What I want to do is change the "1ST04" to "2ND04" etc, so this has t be done in the VBA section rather than through a worksheet as yo suggested. The section on your website seems similar to what I want except cannot get it to work. The line If j 0 And Not .ProcOfLine(i, vbext_pk_Proc) = "test Then _ .ReplaceLine i, Replace(.Lines(i, 1), strFind strReplace, , , vbTextCompare) brings up an error saying "expected variable or procedure, not project at the Replace(.Lines(i, 1) section. If I could get around this hurdle it just might work?!?! Any thoughts would be greatfully received. Kat -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find & Replace: find part cell, replace whole cell | Excel Worksheet Functions | |||
Find and Replace - Replace with Blank Space | Excel Discussion (Misc queries) | |||
Find and replace results can the appearance of find be different? | Excel Discussion (Misc queries) | |||
where to put results of find operation in find and replace functio | Excel Worksheet Functions | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions |