+ Reply to Thread
Results 1 to 4 of 4

VBA Codes Not Working In A New Document

  1. #1
    Registered User
    Join Date
    05-28-2019
    Location
    Edinburgh
    MS-Off Ver
    2013
    Posts
    92

    VBA Codes Not Working In A New Document

    Hi guys,
    A while ago a wrote a few codes, at the time they worked perfectly. I have copied these codes into a new document but for some reason keep getting VALUE and im not sure why.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,186

    Re: VBA Codes Not Working In A New Document

    At the risk of sounding harsh, you've not given us much to go on. Some nebulous code used to work in one document (or possibly, several documents) but doesn't work in a new document.

    What does the code do? You might consider sharing it and maybe heed the suggestion in the yellow banner



    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    05-28-2019
    Location
    Edinburgh
    MS-Off Ver
    2013
    Posts
    92

    Re: VBA Codes Not Working In A New Document

    Hi, ive attached a copy of the workbook. The cells ive highlighted in red contain the functions which ive coded.
    Attached Files Attached Files
    Last edited by jpe1; 11-06-2019 at 08:43 AM.

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,641

    Re: VBA Codes Not Working In A New Document

    Hi there,

    At first glance:

    Please Login or Register  to view this content.
    The log of a negative number is undefined.

    I haven't paid any attention to how the values are calculated, but the overall problem might be related more to the input data than to the code.

    Regards,

    Greg M

+ 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. [SOLVED] 2 vba codes not working when placed together in a sheet
    By anilpatni1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2018, 05:05 AM
  2. Joined Two Codes but second one in not working
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-17-2016, 04:56 AM
  3. Need Help Combing to working VBA codes
    By musicman1985 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2014, 04:38 AM
  4. Combined Two Codes but Not working
    By bhaddya in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2013, 01:59 PM
  5. Codes not working in worksheet
    By bodmas in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 08-24-2011, 08:55 AM
  6. Working out Ave when #div/0 codes
    By TrainerJ in forum Excel General
    Replies: 6
    Last Post: 12-11-2009, 06:19 AM
  7. Highlight Cells Containing Duplicate Document Codes In Commaed Lists
    By C.Perrin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-10-2008, 03:06 PM

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