Home Whiteboard Online Compilers Practice Articles Tools
Library Courses Certifications Login
VBA Tutorial
  • VBA Video Tutorials
  • VBA - Home
  • VBA - Overview
  • VBA - Excel Macros
  • VBA - Excel Terms
  • VBA - Macro Comments
  • VBA - Message Box
  • VBA - Input Box
  • VBA - Variables
  • VBA - Constants
  • VBA - Operators
  • VBA - Decisions
  • VBA - Loops
  • VBA - Strings
  • VBA - Date and Time
  • VBA - Arrays
  • VBA - Functions
  • VBA - Sub Procedure
  • VBA - Events
  • VBA - Error Handling
  • VBA - Excel Objects
  • VBA - Text Files
  • VBA - Programming Charts
  • VBA - Userforms
  • VBA - Quick Guide
  • VBA - Useful Resources
  • VBA - Discussion
  • Selected Reading
  • UPSC IAS Exams Notes
  • Developer's Best Practices
  • Questions and Answers
  • Effective Resume Writing
  • AI Based Resume Builder
  • Personal AI Study Assistant
  • Generate Coding Logic
  • HR Interview Questions
  • Computer Glossary
  • Who is Who

VBA - Year Function



Previous
Quiz
Next

The Year function returns an integer that represents a year of the specified date.

Syntax

Year(date) 

Example

Add a button and add the following function.

Private Sub Constant_demo_Click()
   msgbox(Year("2013-06-30"))
End sub

When you execute the above function, it produces the following output.

2013
vba_date_time.htm
Print Page
Previous
Next
Advertisements
TOP TUTORIALS
  • Python Tutorial
  • Java Tutorial
  • C++ Tutorial
  • C Programming Tutorial
  • C# Tutorial
  • PHP Tutorial
  • R Tutorial
  • HTML Tutorial
  • CSS Tutorial
  • JavaScript Tutorial
  • SQL Tutorial
TRENDING TECHNOLOGIES
  • Cloud Computing Tutorial
  • Amazon Web Services Tutorial
  • Microsoft Azure Tutorial
  • Git Tutorial
  • Ethical Hacking Tutorial
  • Docker Tutorial
  • Kubernetes Tutorial
  • DSA Tutorial
  • Spring Boot Tutorial
  • SDLC Tutorial
  • Unix Tutorial
CERTIFICATIONS
  • Business Analytics Certification
  • Java & Spring Boot Advanced Certification
  • Data Science Advanced Certification
  • Cloud Computing And DevOps
  • Advanced Certification In Business Analytics
  • Artificial Intelligence And Machine Learning
  • DevOps Certification
  • Game Development Certification
  • Front-End Developer Certification
  • AWS Certification Training
  • Python Programming Certification
COMPILERS & EDITORS
  • Online Java Compiler
  • Online Python Compiler
  • Online Go Compiler
  • Online C Compiler
  • Online C++ Compiler
  • Online C# Compiler
  • Online PHP Compiler
  • Online MATLAB Compiler
  • Online Bash Terminal
  • Online SQL Compiler
  • Online Html Editor
  • ABOUT US
  • OUR TEAM
  • CAREERS
  • JOBS
  • CONTACT US
  • TERMS OF USE
  • PRIVACY POLICY
  • REFUND POLICY
  • COOKIES POLICY
  • FAQ'S
tutorials point logo
Download Android App Download IOS App

Tutorials Point is a leading Ed Tech company striving to provide the best learning material on technical and non-technical subjects.

© Copyright 2025. All Rights Reserved.