+ Reply to Thread
Results 1 to 3 of 3

Creating A Newsheet Macro Issue

  1. #1
    Registered User
    Join Date
    10-21-2016
    Location
    Michigan
    MS-Off Ver
    2013
    Posts
    7

    Creating A Newsheet Macro Issue

    Hi All,

    I have the following code that some users are having issues with. I think it specifically relates to the " NewSheet = Trim(InputBox(Mesg, Title))" line.
    The macro was developed by Corporate and seven years later they are saying it's not their problem. Any assistance would be greatly appreciated.
    Thanks!

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 06-22-2017 at 08:54 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Creating A Newsheet Macro Issue

    What do you mean by "issues"?
    • Does the code run?
    • Does it run but do nothing?
    • Does it produce error messages? If so, what do the messages say?
    • Does it produce unexpected/wrong results? If so, how do the results differ from what you expect?
    • Does it hang?

    By the way this line of code
    Please Login or Register  to view this content.
    declares NewSheet as Variant, Title as Variant, and Mesg as String. Some people write lines like this and think they will all be String. That's poor coding style, but it does not appear to be causing a problem here.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    10-21-2016
    Location
    Michigan
    MS-Off Ver
    2013
    Posts
    7

    Re: Creating A Newsheet Macro Issue

    Jeff, my apologies re: the code.
    The error message being received is "Compile Error: Can't find project or library" It defaults to highlighting this in yellow:
    Please Login or Register  to view this content.
    However, "Trim" in this line of code is highlighted blue:
    Please Login or Register  to view this content.
    I know of two users using Excel 2016, I'm not sure what versions the other two are using.

    Thanks!

+ 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. Add NewSheet to Workbook
    By plans in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-05-2016, 10:28 AM
  2. Excel macro code issue in creating Purchase Stock sheet - Please help urgent
    By Aswinraj1989 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-11-2015, 05:28 AM
  3. [SOLVED] Cut data from master and paste into next newsheet depends upon value of a col vba
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-21-2015, 12:36 PM
  4. [SOLVED] vba to cut and paste into newsheet through 3 condition on 3 column
    By johnlara in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-19-2015, 01:41 PM
  5. [SOLVED] Range.Cut Paste on NewSheet
    By dlow in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-23-2015, 03:10 PM
  6. Copy Data between 2 dates and paste it newsheet
    By Knowledge is Wealth in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-10-2013, 09:57 AM
  7. set NewSheet = OldSheet.copy
    By eclapt in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-09-2009, 11:00 AM

Tags for this Thread

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