การอ่านค่าใน Comment หลายบรรทัด
Posted: Mon Oct 14, 2013 4:34 pm
ขอทราบการค่าใน Comment หลายบรรทัดใน cell
เราอ่านค่าได้แค่บรรทัดเดียว บรรทัดที่ 2 เป็นต้นไปมองไม่เห็น ไม่ทราบว่าต้นวนลูปอ่านค่ายังไงค่ะ
เพื่อที่จะเก็บค่า comments ทั้งหมด เก็บลง database อีกทีค่ะ
Dim rng As Range
Set rng = Sheets("PSIAuto").Cells(l_Row + l_CountRow + 2, l_Col)
If rng <> "" Then
For Each mycell In rng.Cells
If Not (mycell.Comment Is Nothing) Then
l_Comment = mycell.Comment.Text
End If
Next mycell
End If
ไม่ทราบว่าต้องเขียนโค้ดเพิ่มยังไงค่ะ ช่วยหน่อยค่ะ ติดปัญหาตรงนี้อย่างเดียวค่ะ
เราอ่านค่าได้แค่บรรทัดเดียว บรรทัดที่ 2 เป็นต้นไปมองไม่เห็น ไม่ทราบว่าต้นวนลูปอ่านค่ายังไงค่ะ
เพื่อที่จะเก็บค่า comments ทั้งหมด เก็บลง database อีกทีค่ะ
Dim rng As Range
Set rng = Sheets("PSIAuto").Cells(l_Row + l_CountRow + 2, l_Col)
If rng <> "" Then
For Each mycell In rng.Cells
If Not (mycell.Comment Is Nothing) Then
l_Comment = mycell.Comment.Text
End If
Next mycell
End If
ไม่ทราบว่าต้องเขียนโค้ดเพิ่มยังไงค่ะ ช่วยหน่อยค่ะ ติดปัญหาตรงนี้อย่างเดียวค่ะ