+ Reply to Thread
Results 1 to 1 of 1

Runing a macro when a new worksheet is created

  1. #1
    Registered User
    Join Date
    05-07-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    10

    Question Runing a macro when a new worksheet is created

    When i create a new worksheet by copying an existing worksheet of the workbook i need to run a macro which sets values for a worsheet in a different workbook.I used the following vb code,
    Please Login or Register  to view this content.
    I have two problems with this code.
    (1)At line 4 the value of m_lngNSheets is "0" which must be "38" based on my workbook count.
    (2)I get a run-time error '1004' (Application-defined or object-defined error) at line 15.

    Can anyone help me with this code..
    Last edited by arlu1201; 05-10-2012 at 03:43 AM. Reason: Please put code tags in future.

+ 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