Recent Posts

VBA: Hàm tách tên trong xâu họ và tên

-
Hàm tách tên trong xâu họ và tên.
(VD: Nếu biết họ tên là Nguyễn Minh Ngọc, hàm sẽ tách ra được tên là Ngọc)
Function GetTen(hoten As String) As String
Dim pos As Integer
pos = 1
If InStr(pos, Trim(hoten), " ") = 0 Then
GetTen = hoten
Exit Function
End If
While InStr(pos + 1, Trim(hoten), " ") > 0
pos = InStr(pos + 1, Trim(ten), " ")
Wend
GetTen = Mid(hoten, pos)
End Function

Tag: VBA, Access, Module, VB.Net, FoxPro

Related Post:

  • Code C#: Giải phương trình bậc nhất (Console)using System; namespace PhuongTrinhBacNhat{    class Program {        static void Main(string[] args) {            Console.Write("Nhap he so a :");            int a = int.Parse(Console.ReadLine());            Console.Write("Nhap h… Read More
  • Code C#: Code Examples sample source codesGet selected checkbox list itemsusing System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;public class Form1 : System.Windows.Forms.Form {   private System.Windows.Forms.CheckedListBox chkListPossibleValues;   private System.Windows.Forms.ListBox lstSelected;   priv… Read More
  • Bài tập sử dụng service và liên kết giữa các serviceChúng tôi đang soạn thảo nội dung...… Read More
  • Hướng dẫn lập trình ứng dụng AndroidKính chào quý độc giả yêu thích lập trình Android,     Hiện nay Android là hệ điều hành trên điện thoại di động được ưa chuộng nhất và cũng là nghề lập trình đang Hot. Để nhằm giúp đỡ cộng đồng người Việt Nam tiếp cận được với bộ môn Lập trình Android một cách dễ dàng và nhanh chóng chúng tôi đã biên soạn chương trình tự học Android từ cơ bản đến n… Read More
  • Code C#: Code Examples sample source codesCenter form window  using System;  using System.Drawing;  using System.Collections;  using System.ComponentModel;  using System.Windows.Forms;  using System.Data;  public class Form1 : System.Windows.Forms.Form {    private Button myButton;     public Form1()   {      this.AutoSc… Read More
  • Code C#: Giải phương trình bậc 2 (Console)/* Giải và biện luận phương trình bậc 2 (sử dụng ứng dụng Console) */using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace GiaiPT_bac2{    class Program{        static void Main(string[] args){            float a, b, c;            string xau;… Read More




Klik untuk melihat kode: :) =( :s :D :-D ^:D ^o^ 7:( :Q :p T_T @@, :-a :W *fck* x@