in
All Tags » VBA » replace (RSS)

Browse by Tags

  • Best Practice when dealing with Strings and replacing a Variable - Excel VBA

    Hi Experts, Just wondering what is the best practice for String Replace/Substitute. i.e. I have a Constant MyConst = "My Name is %FNAME% %LNAME%" And within the actual sub/function i would use MyString=MyConst MyString=Replace(MyString,"%FNAME%","First Name") MyString=Replace...
    Posted to Visual Interdev (Forum) by microsoft on 04-22-2010
  • SaveAs without answering "File Exist, Replace?" question

    I can't seem to find this info, but should be an easy question for most. In VBA for Excel I am saving a sheet to a new file then copy/paste values to remove the formulas, then I need to save it again. But saving again forces the "File Exist by this Name, Do you want to Replace?" question...
    Posted to Excel (Forum) by microsoft on 04-04-2010
  • Search and replace text containing superscripts in Word

    Hi, I have many documents in Microsfot Word 2007 (RTF, DOC or DOCX) which the text includes superscripts. One of the issues I need to solve is to find and replace sentences in which a superscript is located after the stop (the dot), adding a carriage return after the superscripts. The sentences look...
    Posted to Word (Forum) by microsoft on 01-18-2010
  • Excel macro to find all instances

    I have a macro to find black filled cells and replace with a light blue color. I would also like to add find/replace text in those cells changing text color from white to black. Code Snippet: 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: Sub ReplaceByFormat() Application.FindFormat.Clear Application...
    Posted to Excel (Forum) by microsoft on 12-21-2009
  • Access VBA to replace string using values from table

    Hello EE, I need to standardize mailing addresses. I have a table, tblAddressChanges, with two fields [Part], and [CleanedPart]. The intent is to have a function that will replace the Parts with the CleanedParts. I figured that the function would loop through the table to check for all bad address parts...
    Posted to Access Coding/Macros (Forum) by microsoft on 09-14-2009
  • VBA Replace Values

    Hi, Can someone tell me how I would replace a ' in my text field. If I try to update the field it screws up my query! The code I thought I mite use would be something like; (strMessage being my text field name) If InStr(strMessage, "'") = 1 Then Me("strMessage").Value = Replace...
    Posted to Access (Forum) by microsoft on 08-24-2009
  • Find/Replace Chr 10 with ""

    I have an excel workbook that has dates listed in text format. The only problem is many of the dates have one or more Chr(10) characters. I tried using the following code, but nothing happens. I know I can do a find and replace without using the ReplaceFormat, but the dates are converted into date format...
    Posted to Excel (Forum) by microsoft on 08-02-2009
  • VBA replace function whole field match access

    Access 2000 I have the following function that I found from this site that I am using pretty succesfully. However I would like to have the function only search and replace if it finds a match for the whole field not a partial match in the field Public Function FixAll(varIn) Dim strTemp As String If IsNull...
    Posted to Access (Forum) by microsoft on 07-07-2009
  • How do i replace characters in a string in vba

    Hi I have a string which contains certain characters and i want to replace them with others. I know there is a method of doing this but i cant remember the code.... i need the syntax to do this sort of thing Replace(String_to_work_ with, "," , ";") where String_to_work_ with is the...
    Posted to Word (Forum) by microsoft on 06-28-2009
  • VBA remove "/" character from variable

    We use VBA to save as filename from the text in the document. Sometimes there is a "/" in the text that we want to replace (so it won't create an error by appearing to place a path character in a filename. How would we replace this character in a variable? Will increase/split points for...
    Posted to Word (Forum) by microsoft on 06-28-2009
Page 1 of 2 (12 items) 1 2 Next >