+ Reply to Thread
Results 1 to 10 of 10

Don't open the VB Editor when a macro is executed

  1. #1
    Registered User
    Join Date
    05-19-2008
    Posts
    5

    Don't open the VB Editor when a macro is executed

    Hi
    I have a query in Excel 2003.

    My question is:
    I have a macro created for my Excel. I have a short cut key to run this macro. When i run the macro, the VB editor is opened where i have written the code. My requirement is, I don't want the VB editor to be opened when i run the macro. I want the macro to be executed but the VB editor should not be visible to the user.

    Regards,
    Raju

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    Quote Originally Posted by rajusampathirao
    Hi
    I have a query in Excel 2003.

    My question is:
    I have a macro created for my Excel. I have a short cut key to run this macro. When i run the macro, the VB editor is opened where i have written the code. My requirement is, I don't want the VB editor to be opened when i run the macro. I want the macro to be executed but the VB editor should not be visible to the user.

    Regards,
    Raju
    Hi Raju,
    Does the code work??
    That is probably why the VBA editor is opening up.........

  3. #3
    Registered User
    Join Date
    05-19-2008
    Posts
    5
    Hi Dave,

    My Code is working fine.
    I have written the macro to sort a single column in ascending order.
    It is working very fine. But still the VB editor is opened whenever i run the macro.
    How to solve this?

    Regards,
    Raju

  4. #4
    Forum Contributor
    Join Date
    04-30-2008
    Posts
    105
    Quote Originally Posted by rajusampathirao
    Hi Dave,

    My Code is working fine.
    I have written the macro to sort a single column in ascending order.
    It is working very fine. But still the VB editor is opened whenever i run the macro.
    How to solve this?

    Regards,
    Raju
    If the macro is working properly, VB editor won't open up. What criteria are you using to run the macro? Is it done by pressing a button, shortcut key, etc?

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    Quote Originally Posted by rajusampathirao
    Hi Dave,

    My Code is working fine.
    I have written the macro to sort a single column in ascending order.
    It is working very fine. But still the VB editor is opened whenever i run the macro.
    How to solve this?

    Regards,
    Raju
    Lets see the code...

  6. #6
    Registered User
    Join Date
    05-19-2008
    Posts
    5
    Quote Originally Posted by fecurtis
    If the macro is working properly, VB editor won't open up. What criteria are you using to run the macro? Is it done by pressing a button, shortcut key, etc?

    Hi
    I have called the macro from WorkSheet_Change event.
    I have put a condition in that, if all my rows in 1st column are filled, then call the macro. I have written this code in Worksheet_change.

  7. #7
    Registered User
    Join Date
    05-19-2008
    Posts
    5
    Quote Originally Posted by davesexcel
    Lets see the code...
    Hi Dave,

    This is my code...

    Iam calling the macro from the event Worksheet_Change, when my last row in the second column is filled.
    In Worksheet_Change

    Please Login or Register  to view this content.

    In the macro SORT_ASC

    Please Login or Register  to view this content.
    Here Iam sorting the 4th column.


    So whenever i enter the values in 2nd column and i fill my last row, then the macro is called and it sorts the column 4. My column 4 values are based on column 2 and 3 values.
    Please tell me what could be the problem.

    Regards,
    Raju
    Last edited by VBA Noob; 05-21-2008 at 01:21 AM.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Is your worksheet code actually in the worksheet module?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  9. #9
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    Hi,
    Very interesting...
    This part of the code is taking you to the vba editor
    Please Login or Register  to view this content.
    You may have to rename that range

  10. #10
    Registered User
    Join Date
    05-19-2008
    Posts
    5
    Quote Originally Posted by davesexcel
    Hi,
    Very interesting...
    This part of the code is taking you to the vba editor
    Please Login or Register  to view this content.
    You may have to rename that range

    Hi Dave....
    Thanks a lot...that worked...
    I commented the code
    Application.Goto Reference:="SORT_ASC".

    Thanks again...

    Regards,
    Raju.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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