ExcelใฎVBA(ใใฏใญ)ใงใใปใซใฎใใผใฟ๏ผๅคใปๆๅญๅ๏ผใๅๅพใใๆนๆณใซใคใใฆใพใจใใพใใใ
ใปใซใฎใใผใฟ๏ผๅคใปๆๅญๅ๏ผใๅๅพ
VBA(ใใฏใญ)ใงใใผใฟ๏ผๅคใปๆๅญๅ๏ผใๅๅพใใใซใฏvalue,textใกใฝใใใๅฉ็จใใพใใ
่จ่ฟฐไพ | ่ชฌๆ |
---|---|
x = Range(“A1”).Value | ๅคใๅๅพใใๅ ดๅ |
y = Range(“A2”).Text | ๆๅญๅใๅๅพใใๅ ดๅ |
โปๆไฝๅฏพ่ฑกใฎ่จญๅฎใฏใRangeใชใใธใงใฏใใใCellใชใใธใงใฏใใใชใฉใๅฉ็จใใฆ่กใใพใใ
ใตใณใใซใณใผใ
ใตใณใใซใใญใฐใฉใ ใฎใฝใผในใณใผใใงใใ
Sub test() ' A1ใปใซใฎๅคใๅๅพใใฆๅคๆฐxใซๆ ผ็ด x = Range("A1").Value ' A2ใปใซใฎๆๅญๅใๅๅพใใฆๅคๆฐyใซๆ ผ็ด y = Range("A2").Text MsgBox x MsgBox y End Sub
ใกใใปใผใธใใใฏในใซใA1ใปใซใฎๅคใใA2ใปใซใฎๆๅญๅใใ่กจ็คบใใใพใใ
404 NOT FOUND | VBAๅ
ฅ้้ๅ ฑ
ใณใกใณใ