EXCEL TOOLS
Excel Add-ins ที่พัฒนาโดยคุณสันติพงศ์ ณสุย (MVP Excel 2010-2020) ด้วยภาษา C# เพื่อแก้ไขปัญหาไฟล์ใหญ่ คำนวณนาน ทำงานช้า จัดการข้อมูลต่าง ๆ ที่ทำงานประจำวันได้อย่างสะดวกรวดเร็ว สนใจคลิกไปดูได้ที่นี่ครับ => Excel Tools
Excel Add-ins ที่พัฒนาโดยคุณสันติพงศ์ ณสุย (MVP Excel 2010-2020) ด้วยภาษา C# เพื่อแก้ไขปัญหาไฟล์ใหญ่ คำนวณนาน ทำงานช้า จัดการข้อมูลต่าง ๆ ที่ทำงานประจำวันได้อย่างสะดวกรวดเร็ว สนใจคลิกไปดูได้ที่นี่ครับ => Excel Tools
[code]
และปิดด้วย [/code]
ตัวอย่างเช่น [code]dim r as range[/code]
เพื่อให้แตกต่างจากข้อความทั่วไป สะดวกในการอ่านและทดสอบ (คลิกเพื่อดูตัวอย่าง)Code: Select all
Private Sub CommandButton1_Click()
If TextBox1.Text = ("MgO") And TextBox3.Text = ("Mn") And TextBox5.Text = ("Zn") Then
Label1.Caption = ("MgO") & TextBox2.Text & " " And Label1.Caption = ("Mn") & TextBox4.Text & " " And Label1.Caption = ("Zn") & TextBox6.Text & " "
End If
End Sub
Code: Select all
Private Sub CommandButton1_Click()
If TextBox1.Text = ("MgO") And TextBox3.Text = ("Mn") And TextBox5.Text = ("Zn") Then
Label1.Caption = ("MgO") & TextBox2.Text & " " & "Mn" & TextBox4.Text & " " & "Zn" & TextBox6.Text & " "
End If
End Sub
ขอบคุณมากครับeyepop99 wrote: ↑Mon Feb 19, 2018 3:24 pm แก้โค๊ดเป็น
Code: Select all
Private Sub CommandButton1_Click() If TextBox1.Text = ("MgO") And TextBox3.Text = ("Mn") And TextBox5.Text = ("Zn") Then Label1.Caption = ("MgO") & TextBox2.Text & " " & "Mn" & TextBox4.Text & " " & "Zn" & TextBox6.Text & " " End If End Sub
Code: Select all
Private Sub CommandButton1_Click()
If TextBox1.Text <> "" And TextBox3.Text <> "" And TextBox5.Text <> "" Then
Label1.Caption = TextBox1.Text & TextBox2.Text & " " & TextBox3.Text & TextBox4.Text & " " & TextBox5.Text & " " & TextBox6.Text
End If
End Sub
ขอบคุณมากครับ พี่puriwutpokin wrote: ↑Mon Feb 19, 2018 3:41 pm ุ้ถ้าที่ Label เปลี่ยนค่าควรใช้เป็นโค้ดนี้ครับCode: Select all
Private Sub CommandButton1_Click() If TextBox1.Text <> "" And TextBox3.Text <> "" And TextBox5.Text <> "" Then Label1.Caption = TextBox1.Text & TextBox2.Text & " " & TextBox3.Text & TextBox4.Text & " " & TextBox5.Text & " " & TextBox6.Text End If End Sub