메인 컨텐츠로 가기

Excel에서 특정 셀을 클릭 할 때 캘린더를 팝업하는 방법은 무엇입니까?

워크 시트에 자주 입력하고 날짜를 변경해야하는 열 범위가 있다고 가정하면 시간당 수동으로 날짜를 입력하거나 변경하는 것이 지루합니다. 열 범위에 수동으로 입력하지 않고 날짜를 빠르게 입력하는 방법은 무엇입니까? 이 기사에서는 특정 범위의 셀을 클릭하면 달력이 팝업되고 달력에서 날짜를 선택한 후 선택한 셀에 자동으로 날짜가 삽입되는 방법에 대해 설명합니다.


VBA 코드로 특정 셀을 클릭하면 캘린더 팝업

이 문제를 다음과 같이 단계별로 해결하십시오.

주의 사항:이 방법은 Microsoft Excel 32 비트에서만 작동합니다.

1 단계 : 달력을 사용하여 사용자 양식 만들기

셀을 클릭하여 팝업되는 달력이 포함 된 사용자 양식을 작성하십시오.

1. 프레스 다른 + F11 동시에 열려면 키 응용 프로그램 용 Microsoft Visual Basic 창.

2. 에서 응용 프로그램 용 Microsoft Visual Basic 창을 클릭합니다 끼워 넣다 > 사용자 정의 폼.

3. 그런 다음 사용자 정의 폼도구 상자 창이 팝업됩니다. 도구 상자, 하나의 컨트롤을 클릭하고 마우스 오른쪽 버튼을 클릭 한 다음 추가 컨트롤 오른쪽 클릭 메뉴에서. 스크린 샷보기 :

4. 에서 추가 컨트롤 대화 상자에서 아래로 스크롤하여 Microsoft MonthView 컨트롤 에서 옵션 사용 가능한 컨트롤 상자를 클릭 한 다음 OK 버튼을 클릭합니다.

5. 그러면 당신은 볼 수 있습니다 월별 보기 버튼이 도구 상자 창문. 이 MonthView 버튼을 클릭 한 다음 UserForm1 창을 ​​클릭하여 Userform에 달력을 만듭니다.

주의 사항: UserForm의 테두리를 드래그하여 삽입 된 달력에 맞게 UserForm 창의 크기를 조정할 수 있습니다.

6. UserForm1에 삽입 된 달력을 두 번 클릭하고 암호 창에서 원본 코드를 다음 VBA 스크립트로 바꾸십시오.

VBA code: create a user form with calendar

Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
 On Error Resume Next
   Dim xRg As Object
   For Each xRg In Selection.Cells
      xRg.Value = DateClicked
   Next xRg 
   Unload Me
End Sub

주의 사항: 달력에서 날짜를 선택한 후 선택한 셀에 날짜를 삽입하는 코드입니다.

2 단계 : 셀을 클릭 할 때 캘린더 활성화

이제 클릭 할 때 일정을 팝업하도록 특정 셀을 지정해야합니다. 다음과 같이하십시오.

7. 클릭 할 셀이 포함 된 시트 이름을 두 번 클릭하면 왼쪽에 달력이 나타납니다. 프로젝트 창을 클릭 한 다음 아래 VBA 코드를 복사하여 코드 창에 붙여 넣습니다. 스크린 샷보기 :

VBA code: Click cell to pop up calendar

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If (Target.Count = 1) Then
    If Not Intersect(Target, Range("A2:A10")) Is Nothing Then UserForm1.Show
    End If
End Sub

주의 사항: 코드에서 A2 : A10은 캘린더를 팝업하기 위해 클릭 할 셀입니다. 필요에 따라 셀 범위를 변경하십시오.

8. 프레스 다른 + Q 키를 동시에 닫아 응용 프로그램 용 Microsoft Visual Basic 창.

이제부터 현재 워크 시트에서 지정된 범위 내의 셀을 클릭하면 아래 스크린 샷과 같이 달력이 팝업됩니다. 달력에서 날짜를 선택하면 선택한 셀에 날짜가 자동으로 삽입됩니다.


VBA 코드로 특정 셀을 클릭하면 캘린더 팝업

이 섹션에서는 날짜 선택기 ~의 유용성 Excel 용 Kutools. 이 기능을 활성화 한 후 날짜 셀을 클릭하면 달력이 팝업되며 기존 날짜를 새 날짜로 쉽게 바꿀 수 있습니다. 이 기능을 적용하려면 다음 단계를 따르십시오.

1. 클릭 쿠툴 > 내용 > 날짜 선택기 활성화.

2.이 기능을 활성화 한 후 날짜 셀을 클릭하면 달력 아이콘이 셀 오른쪽에 팝업됩니다.

3. 달력 아이콘을 클릭하여 날짜 선택기 대화 상자를 클릭 한 다음 새 날짜를 클릭하여 선택한 셀의 날짜를 바꿉니다.

배송 시 요청 사항:

  • 실행 취소 버튼 : 날짜 변경을 취소하려면이 버튼을 클릭합니다.
  • 닫기 버튼 :이 버튼을 클릭하여 날짜 선택 대화 상자를 닫습니다.
  • 이 기능은 날짜가 포함 된 셀에만 적용 할 수 있습니다.

  이 유틸리티의 무료 평가판 (30 일)을 받으려면 그것을 다운로드하려면 클릭하십시오을 클릭 한 다음 위 단계에 따라 작업 적용으로 이동합니다.


관련 기사:

최고의 사무 생산성 도구

🤖 Kutools AI 보좌관: 다음을 기반으로 데이터 분석을 혁신합니다. 지능형 실행   |  코드 생성  |  사용자 정의 수식 만들기  |  데이터 분석 및 차트 생성  |  Kutools 기능 호출...
인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel용 Kutools로 Excel 기술을 강화하고 이전과는 전혀 다른 효율성을 경험해 보세요. Excel용 Kutools는 생산성을 높이고 시간을 절약하기 위해 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

상품 설명


Office Tab은 Office에 탭 인터페이스를 제공하여 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
Comments (18)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I am not seeing the Microsoft MonthView Control in the listing, but it may be as Pete (#32847) mentioned that this will not work in Office 365 or 64-bit Microsoft Office.
This comment was minimized by the moderator on the site
Hi Teagan Caudle,
I searched and tried the methods suggested in google, but ultimately could not register the MonthView control in Microsoft 365.
Sorry for the inconvenience. Maybe you can check this out.
https://social.technet.microsoft.com/Forums/Azure/en-US/db3b4dff-aad7-4d88-87cc-8f3f117be550/microsoft-windows-common-controls-60-for-office-2016
This comment was minimized by the moderator on the site
There is no Microsoft MonthView Control listed (Office 365), and the directions here doesn't explain how one would get that control, so this is pretty much useless unless you're using an older version of Excel.
This comment was minimized by the moderator on the site
The calendar will show up but when I click on the date, the cell doesn't populate
This comment was minimized by the moderator on the site
Hi,
The code works well in my case. Which Excel version are you using?
This comment was minimized by the moderator on the site
Thank you so much! These directions were super useful :)
This comment was minimized by the moderator on the site
Hi, Is it possible to put the date picker pop-up for multiple column, as in my sheet I have "start date", "end date" and "agreement date". if yes then how?
This comment was minimized by the moderator on the site
Hi jeet,
Follow the steps and replace the range "A2:A10" in the second VBA code with your column range (such as C2:E2).
This comment was minimized by the moderator on the site
Salve il codice funziona benissimo, ma se volessi farlo funzionare anche su un altro foglio
This comment was minimized by the moderator on the site
if i try to select a row, the pop up will activate and the date appears in each cell in that row


how can i avoid this
This comment was minimized by the moderator on the site
Hi Sam,
The code has been updated in the article with the problem solving. Please have a try and thank you for your comment.
This comment was minimized by the moderator on the site
tarihi seçebiliyorum ama a1:a10 hücrelerine seçtiğim tarih eklenmiyor. teşekkür ederim
This comment was minimized by the moderator on the site
Hello everyone,

Can anyone tell me how to popup a calendar in a range of cells, but starting only from the cell right bellow a table header and down bellow in an excel column.


Thank you in advance.
This comment was minimized by the moderator on the site
Use i.e: Range("B6:C30")
This comment was minimized by the moderator on the site
Good Day,
Sorry I didn't got your question. Would be nice if you could provide screenshot of what you are trying to do.
This comment was minimized by the moderator on the site
Use i.e: Range("B6:C30")
This comment was minimized by the moderator on the site
i used these VBA codes and everthing's fine so far. The range is A2:A10 and calendar pops up when you select a cell into it. But if you mark row from 2 to 10 again the calendar pops again. It's the same with column "A" if you mark it, again the calendar pops. How should i proceed, in order to get the calendar only in the range i've defined?
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations