none
Reserved Words RRS feed

  • Question

  • Greetings,

    Where can I find a list of reserved (key)words for Excel 2010 VBA?

    Thanks,
    Shane.
    Office Professional 2010
    Excel 14.0.7151.5001 (64-bit)


    Windows 7 Home Premium SP1 64-bit

    Sunday, July 26, 2015 1:29 AM

Answers

  • Hi cShane,

    As far as I know, there is no such document about reserved words in Excel. However we can refer to the objects and functions in VBA and Excel object modle from the link below:Visual Basic Language Reference

    Excel Object Model Reference

    In addition, since the VBA syntax is similar with VB, we also can refer to the VB's reverse words for the reference. Here is the link for the reserved Words in VB:

    Visual Basic Language Keywords

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, July 27, 2015 2:06 AM
    Moderator
  • Excel won't let me name a sheet "History".

    It is not VBA.

    History is a reserved sheet name. Excel uses the History Sheet for the Track Changes feature that appears on the Tools menu. When you use the Track Changes feature for a Shared Work Book, Excel creates a History tab to track and report the changes.

    Andreas.

    Monday, July 27, 2015 11:28 AM

All replies

  • Hi,

    I could not find a list of VBA reserved word.
    So, I'd like to suggest an alternative, i.e. add a prefix like "my" to your variables. When done it, no variables overlap VBA reserved words.

    Regards,
    Sunday, July 26, 2015 3:14 AM
  • Re:  reserved words in excel

    In the VBE, tap the F2 key to open the Object Browser.
    Also the following are some of the built in names used by Excel...
    '---
     Auto_Activate
     Auto_Close
     Auto_Deactivate
     Auto_Open
     Consolidate_Area
     Criteria
     Data_Form
     Database
     Extract
     _FilterDatabase
     Print_Area
     Print_Titles
     Recorder
     Sheet_Title
    '---
    The suggestion from Ashidacchi can help keep you out of trouble.

    '---
    Jim Cone
    Portland, Oregon USA
    https://goo.gl/IUQUN2 (Dropbox)
    (free & commercial excel add-ins & workbooks)

    • Edited by James Cone Monday, October 31, 2016 1:24 PM
    Sunday, July 26, 2015 12:24 PM
  • Hi cShane,

    As far as I know, there is no such document about reserved words in Excel. However we can refer to the objects and functions in VBA and Excel object modle from the link below:Visual Basic Language Reference

    Excel Object Model Reference

    In addition, since the VBA syntax is similar with VB, we also can refer to the VB's reverse words for the reference. Here is the link for the reserved Words in VB:

    Visual Basic Language Keywords

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, July 27, 2015 2:06 AM
    Moderator
  • Thanks.

    Excel won't let me name a sheet "History". VBA is causing me problems, and I thought maybe it might be because of reserved words.

    Thanks for the responses.
    Shane.


    Windows 7 Home Premium SP1 64-bit

    Monday, July 27, 2015 2:17 AM
  • Excel won't let me name a sheet "History".

    It is not VBA.

    History is a reserved sheet name. Excel uses the History Sheet for the Track Changes feature that appears on the Tools menu. When you use the Track Changes feature for a Shared Work Book, Excel creates a History tab to track and report the changes.

    Andreas.

    Monday, July 27, 2015 11:28 AM
  • Hi Shane,

    As Andreas mentioned that 'History' is the reserved name in Excel 2010. And as far as I test, it could be used in Excel 2013.

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, July 28, 2015 6:16 AM
    Moderator
  • If you would read my earlier post, you would see that I specifically mentioned that the error message was coming from Excel (not VBA).

    Shane.


    Windows 7 Home Premium SP1 64-bit

    Tuesday, July 28, 2015 6:57 AM
  • Hi Shane,

    The description about 'History' from Andreas is correct. If you still have problem about this issue, please feel free to let us know.

    If you have any other issues about Office developing, you can reopen a new thread to involve more communities and you would get more effective response.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, July 29, 2015 3:21 AM
    Moderator
  • Thanks.

    Shane.


    Windows 7 Home Premium SP1 64-bit

    Wednesday, July 29, 2015 4:16 AM