+ Reply to Thread
Results 1 to 7 of 7

Writing formula on Sheet by VBA code, needs Enter Key pressed

  1. #1
    Registered User
    Join Date
    09-16-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    48

    Writing formula on Sheet by VBA code, needs Enter Key pressed

    Hi everyone,
    i wrote a code that copies a formula to specific cells by pressing a button, but i continue to get #NAME? error tag in cells.
    But if i enter them and press the Enter Key, the function works.
    My request is to get all this done automatically, avoiding having to press each time the Enter Key.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Writing formula on Sheet by VBA code, needs Enter Key pressed

    Hi and welcome to the forum.

    It's impossible to help unless you share your code with us and preferably the workbook which contains it.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    09-16-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    48

    Re: Writing formula on Sheet by VBA code, needs Enter Key pressed

    Ops sorry, i thought i posted it.

    Here it is :

    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Writing formula on Sheet by VBA code, needs Enter Key pressed

    Try
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-16-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    48

    Re: Writing formula on Sheet by VBA code, needs Enter Key pressed

    Okay thanks! This works fine, but the problem is with this function :
    Please Login or Register  to view this content.
    Any solution for this?

  6. #6
    Registered User
    Join Date
    09-16-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    48

    Re: Writing formula on Sheet by VBA code, needs Enter Key pressed

    Ok, problem solved.
    I was putting all the functions in italian like IF -> SE ; LEN ->lunghezza
    So for everybody! Put the function name in english!

    Thank you Fluff13!

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Writing formula on Sheet by VBA code, needs Enter Key pressed

    You're welcome & thanks for the feedback.

    I think that if you use the FormulaLocal, then you can use the Italian names & separators, rather than having to convert to English/US equivalents.

+ 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. writing vba code to fill in column of sheet, formula works vba code will not
    By pdx2245 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2019, 05:15 PM
  2. Replies: 4
    Last Post: 02-10-2019, 12:55 PM
  3. How to simulate the ENTER KEY being pressed (ie trigger Enter Key event)
    By michellepace in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2017, 09:41 AM
  4. [SOLVED] Dynamically inserted formula entered offset by one row if enter key is pressed
    By Jonathan78 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-01-2016, 09:02 AM
  5. [SOLVED] Return alt-enter when enter is pressed in a specific cell
    By bigsteve in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2013, 10:21 AM
  6. do something when enter is pressed
    By TechRetard in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-11-2011, 05:24 PM
  7. Run a macro when 'Enter' is pressed?
    By jcup in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2007, 02:11 PM

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