+ Reply to Thread
Results 1 to 17 of 17

Dissapearing formulas

  1. #1
    Forum Contributor
    Join Date
    02-01-2021
    Location
    Manchester
    MS-Off Ver
    365
    Posts
    216

    Dissapearing formulas

    In one worksheet of my app I put some simple formula and as soon as I click the return button, the value turns to 0 and examination reveals that the formula has gone. This however is not consistent. Sometimes the formula is accepted for one instance and then goes and on one occasion it survived till I saved the whole app prior to closing it.
    I have checked that calculation is automatic. What can be going on?
    I have attached a copy of the sheet with the formulas but they are all working normally. The formulas are marked in yellow
    John
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Dissapearing formulas

    Moved to VBA sub-forum.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Dissapearing formulas

    Do you have any userforms where you use the controlsource property of any controls?
    Rory

  4. #4
    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
    44,446

    Re: Dissapearing formulas

    You have these external references

    A11: ='C:\Users\john.southern\Documents\[Budgetv5.0.xlsm]SalesForecast'!C134
    A20: ='C:\Users\john.southern\Documents\[Budgetv5.0.xlsm]SalesForecast'!C144

    Other cell in column A depend on these cells. If they become zero, so do their dependents.
    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


  5. #5
    Forum Contributor
    Join Date
    02-01-2021
    Location
    Manchester
    MS-Off Ver
    365
    Posts
    216

    Re: Dissapearing formulas

    TMS thank you for your interest. Those formulae with a long file path arose because I copied an earlier version sheet by sheet to this version as the earlier version had become corrupted somehow.
    I have corrected them and still have my disappearing formulae. The problem is not that the formulae give an answer of 0, it is that the formulae are no longer there
    Rorya thanks for you as well. Yes I have several controls using controlsource. Can this be a cause?
    John

  6. #6
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Dissapearing formulas

    Quote Originally Posted by Osprey2 View Post
    Yes I have several controls using controlsource. Can this be a cause?
    Yes it can. IMO you should never use that property if you can avoid it. Even unloaded forms in other workbooks can cause problems if it's used.

  7. #7
    Forum Contributor
    Join Date
    02-01-2021
    Location
    Manchester
    MS-Off Ver
    365
    Posts
    216

    Re: Dissapearing formulas

    Rorya I didn't know that. So I must enter values in code ?
    Userform1.textbox1.ControlSorce =.Range("a1").Value or
    Userform1.TextBox1.Value = .Range("A1").Value
    John

  8. #8
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Dissapearing formulas

    I would use the latter.

  9. #9
    Forum Contributor
    Join Date
    02-01-2021
    Location
    Manchester
    MS-Off Ver
    365
    Posts
    216

    Re: Dissapearing formulas

    Still haven't managed to clear all controlsources.
    I have tried the following to populate the listbox
    Please Login or Register  to view this content.
    I get the message "Could not set the value property. Type mismatch"
    The range "Year" is a list of years in the control source.
    I have tried changing the code to
    Please Login or Register  to view this content.
    I then get message "Type Mismatch" even less helpful

  10. #10
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: Dissapearing formulas

    Try:

    Please Login or Register  to view this content.

  11. #11
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Dissapearing formulas

    I think you’ve confused rowsource and controlsource with that one

  12. #12
    Forum Contributor
    Join Date
    02-01-2021
    Location
    Manchester
    MS-Off Ver
    365
    Posts
    216

    Re: Dissapearing formulas

    Thanks for that ByteMarks I tried it and got another strange Error message "Permission denied" I took this a bit further and this gave me a list of possible causes most of which related to file forming.
    This one seemed most relevant,
    You tried to write to a file that another process locked. Wait to open the file until the other process releases it.

    I am running the code under the Change process is this right
    John

  13. #13
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Dissapearing formulas

    If you have the rowsource property set, you will get a permission denied error when trying to populate the control using the List property

  14. #14
    Forum Contributor
    Join Date
    02-01-2021
    Location
    Manchester
    MS-Off Ver
    365
    Posts
    216

    Re: Dissapearing formulas

    We are getting away from my problem which is to populate a ControlSource with a named range without using the controlsource property by using vba. I don't think I have any interest in RowSource. If I can do that I am hoping that my other problems will go away, as it has been stated that lots of problems are caused by ControlSources
    JHohn

  15. #15
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Dissapearing formulas

    I think you got confused. The list of values in a listbox is not provided by the controlsource property. Controlsource for a listbox relates to the selected value. To set the list of values you use Rowsource or the List property. The difference is what was causing your Type Mismatch errors as you were assigning a list of values to the controlsource.

  16. #16
    Forum Contributor
    Join Date
    02-01-2021
    Location
    Manchester
    MS-Off Ver
    365
    Posts
    216

    Re: Dissapearing formulas

    You are dead right I was in a right muddle. Thanks for clearing it up.
    Is it safe to enter the range using the rowsource property or best to use code?
    John

  17. #17
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Dissapearing formulas

    I would use code unless you need column headers, whcih can only easily be done using the rowsource property.

+ 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] Ribbon is dissapearing
    By Potholes in forum Excel General
    Replies: 8
    Last Post: 07-19-2018, 02:58 AM
  2. [SOLVED] Graph Data Outline Dissapearing
    By tryingtoexcelatexcel in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-25-2017, 05:22 AM
  3. personal macro dissapearing
    By elmasguapo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-14-2015, 05:47 PM
  4. [SOLVED] Multipage contents dissapearing
    By PDBartlett in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2014, 11:44 AM
  5. MonthView Calendar dissapearing of Form
    By Foreverlearning in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-21-2012, 06:44 PM
  6. messages dissapearing
    By Todd Huttenstine in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2006, 01:00 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