+ Reply to Thread
Results 1 to 9 of 9

Thread: Change first line of Module with Macro

  1. #1
    Registered User
    Join Date
    05-10-2009
    Location
    NC, USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Exclamation Change first line of Module with Macro

    I have a ' comment in the first line of my modules and I want to change them to something else automatically with a macro. Thanks in advance.

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,226

    Re: Change first line of Module with Macro

    A tough thing to research, perhaps this is worth a shot:

    http://www.exceltip.com/st/Add_conte...Excel/499.html
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-10-2009
    Location
    NC, USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Unhappy Re: Change first line of Module with Macro

    Thanks for the quick reply. I have found this too but it isn't helping me. I only need to change the first line and each module has different info. Again Thanks.

  4. #4
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639

    Re: Change first line of Module with Macro

    You can only change code if he VBA Project is not protected, this means anyone can access your code. See Chip Pearson's articles
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: Change first line of Module with Macro

    Cross posted here, incidentally.

  6. #6
    Registered User
    Join Date
    05-10-2009
    Location
    NC, USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Thumbs up Re: Change first line of Module with Macro

    Thats my post in Mr. Excel, and your solution worked, Thanks!

  7. #7
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639

    Re: Change first line of Module with Macro

    Quote Originally Posted by Bravurian17 View Post
    Thats my post in Mr. Excel, and your solution worked, Thanks!
    Read the Forum Rules and don't cross post without posting links this wastes our time! You will soon find your posts ignored if you continue like this & can't even be bothered to thank members for trying to help you!
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  8. #8
    Registered User
    Join Date
    05-10-2009
    Location
    NC, USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Unhappy Re: Change first line of Module with Macro

    Sorry RoyUK, I saw the post on MrExcel before ExcelForum, Thank You, I may be able to use that site for other ideas.

  9. #9
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639

    Re: Change first line of Module with Macro

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    Read all the Rules, yo have been warned about other infringements.
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0