+ Reply to Thread
Results 1 to 6 of 6

unable to set the numberformat property of the range class error

  1. #1
    Registered User
    Join Date
    01-27-2017
    Location
    INDIA
    MS-Off Ver
    2016
    Posts
    90

    unable to set the numberformat property of the range class error

    Hi,

    i am getting error "unable to set the numberformat property of the range class" after protecting the excel used range.

    [code]

    Sub TimeStamp()
    ActiveCell.Value = Time
    ActiveCell.NumberFormat = "h:mm:ss"
    End Sub
    [\code]

    am getting error at ActiveCell.NumberFormat = "h:mm:ss"

    can anyone let me know how to resolve this.

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: unable to set the numberformat property of the range class error

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-27-2017
    Location
    INDIA
    MS-Off Ver
    2016
    Posts
    90

    Re: unable to set the numberformat property of the range class error

    Hi,

    Still i am getting same error after making changes.


    Thanks

  4. #4
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,329

    Re: unable to set the numberformat property of the range class error

    May you need to change "h:mm:ss" in your local settings.
    In the netherlands we use "u:mm:ss"
    I dont know what you are using in India
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  5. #5
    Registered User
    Join Date
    01-27-2017
    Location
    INDIA
    MS-Off Ver
    2016
    Posts
    90

    Re: unable to set the numberformat property of the range class error

    Hi,

    I tried the same at my home and still getting the same error, in my office its not possible to change the format as i dont have aadmin access.

    is there any other way i can do it.

    actually once again i will let you know what exactly i am trying do, i am trying to lock the used cell in excel i.e once the data is entered in to any cell that cell should get locked and editing should be prohibited , when i am trying with below code entire sheet is getting locked once saved but what i am looking is cell based , i mean once the data entered in any cell that perticular cell should get locked from editing not the entire sheet.

    Please Login or Register  to view this content.
    please let me know if you need any further info.

  6. #6
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,329

    Re: unable to set the numberformat property of the range class error

    i dont have aadmin access.
    Don't change your locals settings
    Change VBA code into the same as how your local settings are

+ 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] Getting --unable to get the findnext property of the range class ERROR
    By DeanJS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-10-2014, 11:38 AM
  2. Error 1004: Unable to Set Hidden property of the range class...
    By jaysakle in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-03-2013, 02:51 AM
  3. unable to set FormulaArray property of Range Class Error
    By BuglerX in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 11-23-2011, 01:13 PM
  4. unable to set FormulaArray property of Range class Error
    By BuglerX in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-23-2011, 12:14 PM
  5. Error 1004 (unable to set the hidden property of the range class)
    By alex.heng in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-14-2011, 12:45 AM
  6. Unable to set the FormulaArray Property of the Range Class - Error 1004
    By manchmal2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2010, 05:08 PM
  7. Error 1004 Unable to set the Hidden Property of the Range Class
    By nld in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2007, 10:56 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