+ Reply to Thread
Results 1 to 3 of 3

Moving a sheet module from one workbook to another

  1. #1
    Registered User
    Join Date
    02-06-2009
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2007
    Posts
    46

    Moving a sheet module from one workbook to another

    I have written a macro to format a spreadsheet and then copy the formatted information into a new spreadsheet and close the original spreadsheet. The problem I have is that I have some code written to highlight a row a certain color based on a data validation list. I need to get that code into the new sheet so that it will work after the macro is closed.
    Here is the code I have found/put together to try and move the module. It adds the module as a class module instead of a sheet module.

    Please Login or Register  to view this content.
    Here is the code I am trying to move:
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    08-29-2011
    Location
    Mississauga, CANADA
    MS-Off Ver
    Excel 2010
    Posts
    503

    Re: Moving a sheet module from one workbook to another

    Export it to a .bas rather than .txt

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Moving a sheet module from one workbook to another

    You could just copy the sheet and have it as the basis for your new workbook.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

+ 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