+ Reply to Thread
Results 1 to 7 of 7

Worksheet event

  1. #1
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Worksheet event

    Guys,
    I'm facing problems with VB scripts.whenever i open an spread sheet,it is asking for enable/disable macros.i've not assigned any macros for any spread sheets.when i go VB design mode this is wht i've seen.
    Worksheet
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    End Sub


    can somebody tell me,what is it doing and from where it came from.because i'm not familiar with macros and VB Scripts.i need to delete this script from my spread sheet for ever.


    Regards,
    Akbar

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello akbar,

    I can't answer where it came from, but deleting it is easy.

    1. Right click on the sheet tab that has the code.
    2. Select all the code that appears in the Visual Basic Editor window, and press the Delete key.
    3. Press CTRL+S to save the changes.
    4. Press ALT+Q to close the VBS and return to Excel.

    Sincerely,
    Leith Ross

  3. #3
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261
    Lieth,
    Still the same problem,i'll attach the sheet,can u please have a look on that

    Regards,
    Akbar
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    The attached workbook still has the following code
    Please Login or Register  to view this content.
    You need to remove the code

    Leiths reply gives instructions on how to remove the code

    which is basically you select all the code & then delete it
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  5. #5
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261
    that is what i'm talking about.i deleted the code,then done everything as per leith instructions still the code remains.


    Regards,
    Akbar

  6. #6
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    I have removed the code from the attachment with this reply

    Try it & see what happens.

    There is nothing in the workbook that stops it from being deleted or would cause the code to re-appear once deleted & the workbook saved
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261
    Thanks dear,
    that was my mistake,i understood now wht happ.

    Regards,
    Akbar

+ 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