Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello!
I have an issue that doesn't seem like it would be a big deal, but it is causing major headaches. I should say that I am using Excel 2003: What I need to do is have a standard Excel document that a user can modify to include text that will be replaced with information from a database. This works great currently. How I do it, is the user will place the field code as a string in the body of a template Excel template (for example: person_name). When the user clicks a button in my ASP page, I call the File System Object and copy the template document to a location on the server. This works great! Now, I want to replace the string in the copied document with that of a field value as generated from the ASP page. This works great also! I want to allow the user to add or remove strings from the Excel template as they see fit, but currently, if they remove a field from the template, it is obviously not available in the copied document as outlined above. This causes an error!!!! i.e. if the replacement text is not in the Excel workbook, my code will progress no further! I have tried to use .EnableEvents = False but this doesn't work either. What I need it to do is if it doesn't find the search string, to just move on. Here is some partial code (its in JScript but I converted it here to VBScript): Set objRange = xlApp.ActiveWorkbook.Worksheets(w).UsedRange objRange.Select objRange.Replace( strFindText, strReplaceText) -- Thanks! Scott |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counting instances of found text (Excel error? Or user error?) | Excel Worksheet Functions | |||
search function without error if not found | Excel Programming | |||
Return text found in a search | Excel Worksheet Functions | |||
The search key was not found error | New Users to Excel | |||
Search column - return row found in long text string | Excel Programming |