Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Urgent - Excel/Word Macro Question

Urgent - Excel/Word Macro Question

Scheduled Pinned Locked Moved Visual Basic
toolsquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    itnovice
    wrote on last edited by
    #1

    Could somebody post vb script for an excel macro that does the following 1)Accept the Input i) a string and ii) a test file with path (say C:\ip.txt) Output should be written to say C:\op.txt mentioning how manu instances of the case sensitive string occurs in each line of the file Eg: C:\ip.txt has the following lines and the search is for the string 'any' any many many anyone ANY nany Output file C:\op.txt should display Line # Number of instances 1 2 2 2 3 1 2) Same requirement as above but string is non-case sensitive 3) Same requirement above but seach for a character and not a string 4) Same requirement as above but the Input is a word .doc file instead of .txt file 5) What changes should I make to the code to run the macro from Word instead of Excel Thanks itnovice

    S 1 Reply Last reply
    0
    • I itnovice

      Could somebody post vb script for an excel macro that does the following 1)Accept the Input i) a string and ii) a test file with path (say C:\ip.txt) Output should be written to say C:\op.txt mentioning how manu instances of the case sensitive string occurs in each line of the file Eg: C:\ip.txt has the following lines and the search is for the string 'any' any many many anyone ANY nany Output file C:\op.txt should display Line # Number of instances 1 2 2 2 3 1 2) Same requirement as above but string is non-case sensitive 3) Same requirement above but seach for a character and not a string 4) Same requirement as above but the Input is a word .doc file instead of .txt file 5) What changes should I make to the code to run the macro from Word instead of Excel Thanks itnovice

      S Offline
      S Offline
      Steve Pullan
      wrote on last edited by
      #2

      itnovice wrote:

      Could somebody post vb script for an excel macro that does the following

      You're kidding right? You expect this free, gratis, for nothing, zip, zero? Besides - you should post this in the correct forum. ...Steve 1. quod erat demonstrandum 2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once :-) (Translation: I'll show you the way, but not write the code for you.)

      G 1 Reply Last reply
      0
      • S Steve Pullan

        itnovice wrote:

        Could somebody post vb script for an excel macro that does the following

        You're kidding right? You expect this free, gratis, for nothing, zip, zero? Besides - you should post this in the correct forum. ...Steve 1. quod erat demonstrandum 2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once :-) (Translation: I'll show you the way, but not write the code for you.)

        G Offline
        G Offline
        Garner T
        wrote on last edited by
        #3

        Steve, If you don't intend to help why do you even waste our time with your insults? Yes, there are many helpfull people here that will go out of their way to help others! That is what this forum is all about, one person helping another. I have gotten tons of help from great people on this forum and if I can help someone with my limited abilities I will. Yes, that is what this is all about. People helping other people FREE, GRATIS, FOR NOTHING, ZIP, ZERO except for the possible return of someone else helping them. I have had people send helpfull code to me and I have sent code to others. I have never been charged for the help that I've received and I've never asked anyone to pay me. If you want paid then I think that you are on the wrong sight.:confused:

        S 1 Reply Last reply
        0
        • G Garner T

          Steve, If you don't intend to help why do you even waste our time with your insults? Yes, there are many helpfull people here that will go out of their way to help others! That is what this forum is all about, one person helping another. I have gotten tons of help from great people on this forum and if I can help someone with my limited abilities I will. Yes, that is what this is all about. People helping other people FREE, GRATIS, FOR NOTHING, ZIP, ZERO except for the possible return of someone else helping them. I have had people send helpfull code to me and I have sent code to others. I have never been charged for the help that I've received and I've never asked anyone to pay me. If you want paid then I think that you are on the wrong sight.:confused:

          S Offline
          S Offline
          Steve Pullan
          wrote on last edited by
          #4

          Garner T wrote:

          If you don't intend to help why do you even waste our time with your insults?

          I do intend to help - but I'm not going to do ALL the work for them as has been CONSTANTLY been requested by many people on this forum. Insults? I don't think I insulted anyone with my previous post? You'd certainly know an insult if I penned one.

          Garner T wrote:

          Yes, there are many helpfull people here that will go out of their way to help others! That is what this forum is all about, one person helping another. I have gotten tons of help from great people on this forum and if I can help someone with my limited abilities I will.

          I know - I am one of those people - if you just go back and check my post history. I'll admit though that the last few weeks have been skewed towards the 'unhelpful' posts due to the influx of people wanting a free ride.

          Garner T wrote:

          People helping other people FREE, GRATIS, FOR NOTHING, ZIP, ZERO except for the possible return of someone else helping them. I have had people send helpfull code to me and I have sent code to others. I have never been charged for the help that I've received and I've never asked anyone to pay me.

          Indeed I do help others - but only those who show that they are willing to help themselves (read my signature lines if you have not already). Posts like the one that triggered this tirade just don't cut the mustard. They basically demand that the work be handed to them on a platter. No way Jose - not from this little black duck. I also notice the lack of responses to this person's request for help. Looks like no one else was willing to do this guy's homework either. If everyone actually read this post from Chris Maunder[^] there would be no need for me or anyone else to state the bleeding obvious everytime. And while I'm at it, I am not the only person on this forum that thinks the same way. I am a little more vocal than most - and for the record have got it wrong at times and have apologised where appropriate - but I'm certainly not 'Robinson Crusoe'.

          Garner T wrote:

          If you want

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups