สอบถามฟอร์มปฏิทินครับ
Posted: Sat Jan 02, 2021 5:42 pm
ปฏิทิน ที่อยู่ในไฟล์นี้ ทำยังไงให้ใช้งานได้ครับ
หรือมี
วิธีการแบบอื่นไหมครับ ที่เป็น popup ปฏิทินครับ
หรือมี
วิธีการแบบอื่นไหมครับ ที่เป็น popup ปฏิทินครับ
คลังคำตอบแห่งความรู้จากคนไทย เพื่อโลกที่ต้องการเข้าใจในสิ่งเล็ก ๆ อย่างลึกซึ้ง
http://www.snasui.com/
Using GetDate Function ประกอบซึ่งจะมีการ Protect เอาไว้ สามารถยกเลิกการ Protect โดยคลิกขวาที่แถบชีตแล้วเลือก UnprotectBasicCalendar ตามด้านล่าง
Code: Select all
Sub BasicCalendar()
dateVariable = CalendarForm.GetDate
If dateVariable <> 0 Then Range("H16") = dateVariable
End Sub
Range("H16") = dateVariable เป็นตำแหน่งเซลล์ใด ๆ ที่ต้องการให้แสดงผลลัพธ์Code: Select all
SelectedDate:=Range("H34").value, _Code: Select all
If dateVariable <> 0 Then Range("H34") = dateVariableCode: Select all
Sub AdvancedCalendar()
dateVariable = CalendarForm.GetDate( _
SelectedDate:=Range("H34").value, _
FirstDayOfWeek:=Monday, _
DateFontSize:=12, _
TodayButton:=True, _
OkayButton:=True, _
ShowWeekNumbers:=True, _
BackgroundColor:=RGB(243, 249, 251), _
HeaderColor:=RGB(147, 205, 2221), _
HeaderFontColor:=RGB(255, 255, 255), _
SubHeaderColor:=RGB(223, 240, 245), _
SubHeaderFontColor:=RGB(31, 78, 120), _
DateColor:=RGB(243, 249, 251), _
DateFontColor:=RGB(31, 78, 120), _
TrailingMonthFontColor:=RGB(155, 194, 230), _
DateHoverColor:=RGB(223, 240, 245), _
DateSelectedColor:=RGB(202, 223, 242), _
SaturdayFontColor:=RGB(0, 176, 240), _
SundayFontColor:=RGB(0, 176, 240), _
TodayFontColor:=RGB(0, 176, 80))
If dateVariable <> 0 Then Range("H34") = dateVariable
End SubCode: Select all
Private Sub CommandButton2_Click()
UserForm1.TextBox1 = Sheets("Sheet1").Range("H34")
TextBox1.value = Format(TextBox1.value, "dd/mm/yyyy")
End SubCode: Select all
Sub AdvancedCalendar()
dateVariable = CalendarForm.GetDate( _
'Other code
If dateVariable <> 0 Then UserForm1.TextBox1.Text = Format(dateVariable, "dd/mm/yyyy")
End Sub