1. 아별툴
  2. 아별툴 패밀리
  3. 엑셀 질문하기
  4. 엑셀 강좌
  5. 엑셀 팁
  6. 엑셀 자료실
  7. 엑셀 연구과제
  8. 엑셀 북마크
  9. 관련 프로그램 소개

메모 입력할때 사용자 이름 제거하고 입력하기..

조회 수 5434 추천 수 2 2006.01.19 01:14:01
출처 : http://www.excellove.com/board/bbs/zboard.php?id=excel_tip&page=1&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=headnum&desc=asc&no=56


'******************************************************
'워크시트상 특정셀에서 바로가기(Ctrl+M)키를 누르고 입력
'상자로 간단히 메모를 삽입할 수 있습니다. 기존에 메모가
'작성되어있는 셀에서는 기존내용을 편집할 수 있습니다.
'******************************************************
'=============메모작성===============St
Sub 메모작성() '// 바로가기키 Ctrl+M로 지정
    Dim strInput As String
    Dim strCommect As String
    On Error Resume Next
    
    Application.DisplayCommentIndicator = xlCommentIndicatorOnly '//셀 팁은 숨기고 메모 표시기만 표시
    Application.ScreenUpdating = False
    
    If ActiveCell.Comment = True Then
       strCommect = ActiveCell.Comment.Text '//기존메모입력받음
    End If
    
    strInput = InputBox("메모 내용을 입력하시오.", "메모입력", strCommect)
    
    If strInput = "" Then Exit Sub '//내용없으면 종료
    
    With ActiveCell
        .ClearComments '//기존메모제거
        .AddComment '//메모삽입
        .Comment.Visible = True '//메모개체보이게
        .Comment.Text Text:=strInput '//메모내용입력
    End With
    
    ActiveCell.Comment.Shape.Select '//메모개체선택(내용편집위함)
    With Selection
        .AutoSize = True '//자동크기
        .Font.Name = "굴림" '//글씨체
        .Font.FontStyle = "굵게" '//글씨굵게지정
        .Font.Size = 9 '//클씨크기
        '.Font.ColorIndex = xlAutomatic '//글씨색부여 기본색
        .Font.ColorIndex = 3 '//빨간색
    End With
    ActiveCell.Comment.Visible = False '//메모 숨기기
End Sub
'=============메모작성===============Ed

과 같습니다.

더 다양한 기능을 추가하려면, 조금 더 복잡한 방법이 동원되어야 할 것 같습니다만...
문서 첨부 제한 : 0Byte/ 2.00MB
파일 제한 크기 : 2.00MB (허용 확장자 : *.*)
List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 기타 엑셀 VBA 간단한 팁 모아놓기.. +_+ [레벨:30]아별 2007-01-24 34087