+ Reply to Thread
Results 1 to 9 of 9

Help require to put the code in sheet module to work it automatically

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Help require to put the code in sheet module to work it automatically

    Hi friends,
    The code is working fine in standard module but now I want to put it in sheet module to work it automatically after entering a register number in column ‘B’ on Information sheet. Please don’t do any change in code simply do the necessary change to put in sheet module.

    Please Login or Register  to view this content.
    Any help will be appreciated.

    Thanking you in anticipation.
    Sincerely,

    mso3

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Help require to put the code in sheet module to work it automatically

    Maybe:

    Please Login or Register  to view this content.
    In the sheet module along with your program
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help require to put the code in sheet module to work it automatically

    Thank you but I want to put this code in sheet module to run it automatically. Your suggestion is also perfect but I don't want user to click on macro and run it manually so I want to put it in the sheet module.

    Thank you.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Help require to put the code in sheet module to work it automatically

    Just put it in the sheet module

  5. #5
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help require to put the code in sheet module to work it automatically

    Sorry, The code is missing. Code please!

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Help require to put the code in sheet module to work it automatically

    Hi, mso,

    Please don’t do any change in code simply do the necessary change to put in sheet module.
    Sorry but for me any change in a cell in Column B should only trigger the necessary alterations for the row(s) in which the event is raised, and this means an alteration to the code. Besides: why have B200 changed and work with your given ranges from row 2 to 90?

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  7. #7
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help require to put the code in sheet module to work it automatically

    Hi Holger,
    Sorry, you are absolutely right. I agree with you. Don't change in code means I don't want to do any change in both formulas. You are free to do any change to put in the sheet module . I agree that it didn't require the cell range 2-90 it will work till the last row.

    Please see the attached workbook in which I inserted the code in standard module which is working fine. Please do the necessary change to put it in sheet module to work automatically after entering the reg. no. in column 'b' on information sheet.

    Thank you.
    Attached Files Attached Files

  8. #8
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Help require to put the code in sheet module to work it automatically

    Hi, mso3,

    maybe try this code:
    Please Login or Register  to view this content.
    Ciao,
    Holger

  9. #9
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help require to put the code in sheet module to work it automatically

    Hi Holger,
    Excellent! Perfect solution.

    Thank you and have a nice day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help require to change the font automatically by vba code
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-25-2014, 11:44 PM
  2. Replies: 3
    Last Post: 03-18-2014, 09:34 AM
  3. [SOLVED] Code locks cells when inserted in sheet module but returns error in standard module
    By yoda66 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2014, 07:39 AM
  4. making a macro run automatically on start and make code work only on first sheet
    By Alheksi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-12-2010, 04:18 AM
  5. how to access Sheet module, normal module, Worbook module to type code
    By alibaba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2009, 07:51 AM

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.6.0 RC 1