VBA - WeekDay Name - Tutorialspoint
文章推薦指數: 80 %
VBA - WeekDay Name ... The WeekDayName function returns the name of the weekday for the specified day. Syntax. WeekdayName(weekday[,abbreviate[,firstdayofweek]]) ... VBATutorial VBA-Home VBA-Overview VBA-ExcelMacros VBA-ExcelTerms VBA-MacroComments VBA-MessageBox VBA-InputBox VBA-Variables VBA-Constants VBA-Operators VBA-Decisions VBA-Loops VBA-Strings VBA-DateandTime VBA-Arrays VBA-Functions VBA-SubProcedure VBA-Events VBA-ErrorHandling VBA-ExcelObjects VBA-TextFiles VBA-ProgrammingCharts VBA-Userforms VBAUsefulResources VBA-QuickGuide VBA-UsefulResources VBA-Discussion SelectedReading UPSCIASExamsNotes Developer'sBestPractices QuestionsandAnswers EffectiveResumeWriting HRInterviewQuestions ComputerGlossary WhoisWho VBA-WeekDayName Advertisements PreviousPage NextPage TheWeekDayNamefunctionreturnsthenameoftheweekdayforthespecifiedday. Syntax WeekdayName(weekday[,abbreviate[,firstdayofweek]]) ParameterDescription Weekday−Arequiredparameter.Thenumberoftheweekday. Toabbreviate−Anoptionalparameter.ABooleanvaluethatindicatesifthemonthnameistobeabbreviated.Ifleftblank,thedefaultvaluewouldbetakenasFalse. Firstdayofweek−Anoptionalparameter.Specifiesthefirstdayoftheweek. 0=vbUseSystemDayOfWeek-UseNationalLanguageSupport(NLS)APIsetting 1=vbSunday-Sunday 2=vbMonday-Monday 3=vbTuesday-Tuesday 4=vbWednesday-Wednesday 5=vbThursday-Thursday 6=vbFriday-Friday 7=vbSaturday-Saturday Example Addabuttonandaddthefollowingfunction. PrivateSubConstant_demo_Click() msgbox("Line1:"&WeekdayName(3)) msgbox("Line2:"&WeekdayName(2,True)) msgbox("Line3:"&WeekdayName(1,False)) msgbox("Line4:"&WeekdayName(2,True,0)) msgbox("Line5:"&WeekdayName(1,False,1)) EndSub Whenyouexecutetheabovefunction,itproducesthefollowingoutput. Line1:Tuesday Line2:Mon Line3:Sunday Line4:Tue Line5:Sunday vba_date_time.htm PreviousPage PrintPage NextPage Advertisements Print AddNotes Bookmarkthispage ReportError Suggestions Save Close Dashboard Logout
延伸文章資訊
- 1VBA WeekDayName函數- VBA教學 - 極客書
WeekDay WeekDayName函數返回工作日指定日的名稱。 語法: WeekdayName ( weekday [, abbreviate [, firstdayofweek ]]) 參...
- 2VBA - WeekDay Name - Tutorialspoint
VBA - WeekDay Name ... The WeekDayName function returns the name of the weekday for the specified...
- 3VBA Function WEEKDAYNAME - BetterSolutions.com
WEEKDAYNAME(weekday [,abbreviate] [,firstdayofweek]) ... * If "abbreviate" = True then the weekda...
- 4VBA WeekdayName Function - Automate Excel
In the VBA Editor, you can type “WeekdayName(” to see the syntax for the WeekdayName Function: Th...
- 5VBA WEEKDAYNAME Function - ExcelFunctions.net
The VBA WeekdayName Function returns a string containing the weekday name, for a supplied integer...