InputBox Function

μ‚¬μš©μžκ°€ ν…μŠ€νŠΈλ₯Ό μž…λ ₯ν•  수 μžˆλŠ” λŒ€ν™” μƒμžκ°€ ν‘œμ‹œλ©λ‹ˆλ‹€. μž…λ ₯ λ‚΄μš©μ€ λ³€μˆ˜μ— ν• λ‹Ήλ©λ‹ˆλ‹€.

InputBox 문은 λŒ€ν™” μƒμžλ₯Ό 톡해 ν…μŠ€νŠΈλ₯Ό μž…λ ₯ν•˜λŠ” νŽΈλ¦¬ν•œ λ°©λ²•μž…λ‹ˆλ‹€. 확인 λ˜λŠ” Return ν‚€λ₯Ό 눌러 μž…λ ₯ λ‚΄μš©μ„ ν™•μΈν•˜λ©΄ ν•¨μˆ˜ λ°˜ν™˜ κ°’μœΌλ‘œ μž…λ ₯ λ‚΄μš©μ΄ κ΅¬ν•΄μ§‘λ‹ˆλ‹€. μ·¨μ†Œλ₯Ό 눌러 λŒ€ν™” μƒμžλ₯Ό λ‹«μœΌλ©΄ InputBoxλŠ” 빈 λ¬Έμžμ—΄("")을 ν‘œμ‹œν•©λ‹ˆλ‹€.

ꡬ문:


InputBox (Msg As String[, Title As String[, Default As String[, x_pos As Integer, y_pos As Integer]]]])

λ°˜ν™˜ κ°’:

String

맀개 λ³€μˆ˜:

Msg: λŒ€ν™” μƒμžμ— λ©”μ‹œμ§€λ‘œ ν‘œμ‹œλ˜λŠ” λ¬Έμžμ—΄ μ‹μž…λ‹ˆλ‹€.

Title: λŒ€ν™” μƒμžμ˜ 제λͺ© ν‘œμ‹œμ€„μ— ν‘œμ‹œλ˜λŠ” λ¬Έμžμ—΄ μ‹μž…λ‹ˆλ‹€.

Default: λ‹€λ₯Έ μž…λ ₯ λ‚΄μš©μ΄ μ œκ³΅λ˜μ§€ μ•Šμ„ 경우 ν…μŠ€νŠΈ ν•„λ“œμ— κΈ°λ³Έκ°’μœΌλ‘œ ν‘œμ‹œλ˜λŠ” λ¬Έμžμ—΄ μ‹μž…λ‹ˆλ‹€.

x_pos: λŒ€ν™” μƒμžμ˜ κ°€λ‘œ μœ„μΉ˜λ₯Ό μ§€μ •ν•˜λŠ” μ •μˆ˜ μ‹μž…λ‹ˆλ‹€. 이 μœ„μΉ˜λŠ” μ ˆλŒ€ μ’Œν‘œμ΄λ©° Office μ‘μš© ν”„λ‘œκ·Έλž¨μ˜ 창을 μ°Έμ‘°ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

y_pos: λŒ€ν™” μƒμžμ˜ μ„Έλ‘œ μœ„μΉ˜λ₯Ό μ§€μ •ν•˜λŠ” μ •μˆ˜ μ‹μž…λ‹ˆλ‹€. 이 μœ„μΉ˜λŠ” μ ˆλŒ€ μ’Œν‘œμ΄λ©° Office μ‘μš© ν”„λ‘œκ·Έλž¨μ˜ 창을 μ°Έμ‘°ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

x_pos 및 y_posλ₯Ό μƒλž΅ν•  경우 λŒ€ν™” μƒμžλŠ” ν™”λ©΄μ˜ 쀑앙에 λ†“μž…λ‹ˆλ‹€. μœ„μΉ˜λŠ” νŠΈμœ•μœΌλ‘œ μ§€μ •λ©λ‹ˆλ‹€.

예:


Sub ExampleInputBox
Dim sText As String
    sText = InputBox ("κ΅¬μ ˆμ„ μž…λ ₯ν•˜μ‹­μ‹œμ˜€:","μ‚¬μš©μž κ·€ν•˜")
    MsgBox ( sText , 64, "ꡬ절 확인")
End Sub

Please support us!