Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

vb ÖÐ - VB / »ù´¡Àà

dim a as string,b as string£¬c as string
a="¹¤³Ì±àºÅ,µ¥Î»¹¤³ÌÃû³Æ,·Ö²¿¹¤³Ì±àºÅ"
b="µ¥Î»¹¤³ÌÃû³Æ"
c="µ¥Î»"
Ôõô²ÅÄÜÅжϳöa×Ö·û´®ÖдæÔÚb×Ö·û´®£¬¶ø²»´æÔÚc×Ö·û´®

¿´¿´instr
»Ø¸´ÄÚÈÝÌ«¶ÌÁË£¡»Ø¸´ÄÚÈÝÌ«¶ÌÁË£¡»Ø¸´ÄÚÈÝÌ«¶ÌÁË£¡»Ø¸´ÄÚÈÝÌ«¶ÌÁË£¡

Ï£Íû×îºÃÓоßÌå´úÂë £¬±¾ÈËÊÇÐÂÊÖ£¬Ð»Ð»

Äã˵µÄ¡®´æÔÚb×Ö·û´®£¬¶ø²»´æÔÚc×Ö·û´®¡¯
ÊÇÈ«²¿»¹ÊDz¿·Ö£¿

if instr(a,b)<>0 and instr(a,c)=0 then

'aÖаüÀ¨bµ«²»°üÀ¨c
end if

if instr(a,b) and instr(a,c)=0 then 
  '....
end if

ÎÒµÄa¡¢bºÍc¶¼ÊDz»¹Ì¶¨µÄ£¬ÎÒÉÏÃæ¸ø³öµÄÖ»ÊÇÁгöµÄÒ»¸öÀý×Ó


instrº¯Êý

»òÕßÓÃsplitº¯Êý½«a×Ö·û´®°´ÕÕ¡°£¬¡±·ÖÀ뿪À´£¬È»ºóÅжÏ×Ö·û´®ÊÇ·ñÏàµÈ

×îºÃÊÇinstrº¯ÊýÁË

VB code:

Option Explicit

Function StringComp(ByVal s As String, sFind1 As String, sFind2 As String) As Long
'µÚÒ»¸ö´æÔÚ·µ»Ø1,µÚ¶þ¸ö´æÔÚ·µ»Ø2,¶þ¸ö¶¼´æÔÚ·µ»Ø3,¶þ¸ö¶¼²»´æÔÚ,·µ»Ø0
Const SEPARATOR = ","
s = SEPARATOR & s & SEPARATOR
sFind1 = SEPARATOR & sFind1 & SEPARATOR
sFind2 = SEPARATOR & sFind2 & SEPARATOR
StringComp = -(InStr(s, sFind1) > 0) + -2 * (InStr(s, sFind2) > 0)

End Function

Private Sub Command1_Click()
Dim a As String, b As String, c As String

a = "¹¤³Ì±àºÅ,µ


Ïà¹ØÎÊ´ð£º

¡¾¼±Çó¡¿VBÖÐʹÓÃWScriptµ÷ÓÃÍⲿÃüÁî - VB / »ù´¡Àà

ÔÚÏÂÊÇvbµÄÐÂÊÖ£¬Ïëд¶Î³ÌÐò£¬ÔÚvbÖУ¬Ê¹ÓÃwscriptµ÷ÓÃһЩÍⲿµÄÃüÁµ«ÊdzÌÐòÖ´ÐÐÒ»Ö±ÓдíÎó£¬Çë¸÷λ¸ßÊÖ°ïæ½â´ðÏ£¬Ð»Ð»¡£
´úÂëÈçÏ£º
VB code:

Private Function getFile_CMD(filename, filepath) As Bo ......

°ïÎҸĸÄÕâVBÌâ - VB / »ù´¡Àà

°ïÎÒ¸Ä¸Ä ÎÒ×ܾõµÃÓÐÎÊÌâ
Type ID
  number As Single
  score As Integer
  name As String * 6
End Type
Dim personl As ID, i%
Private Sub Command1_Click()
 i = 0
&nbs ......

Çë½Ì!ÓõÄÊÇVB 6.0 - VB / ¿Ø¼þ

°ÑÒÑÓÐÊý¾Ý£¨Êý¾Ý´óÓÚ20ÐУ©µÄRS(recordset)µÄµÚ10ÐÐÊý¾ÝÓëµÚ11ÐÐÊý¾Ý×ö¼Ó·¨ºó£¬É¾³ýµÚ11ÐеÄÊý¾Ý£¬È»ºó°ÑºóÃæµÄÊý¾ÝÏòÇ°ÒÆ¡£
RSµÄ»°ÐÞ¸ÄÊý¾ÝÊÇ»á¸üÐÂÊý¾Ý¿â£¬ÏÖÔÚµÄÎÊÌâÊÇRSÀïµÄÒÑÓÐÊý¾ÝÊÇÓÃSQLÓï¾ä·ÖÀàͳ¼Æ³öÀ´µÄ ......

vb¶ÁÈ¡ÓÃwordת»»³ÉµÄxmlÀïµÄÊý¾Ý - VB / »ù´¡Àà

Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' ´ò¿ª¸Õ´´½¨µÄÎļþ¡£
ReDim MyString(LOF(1) - 1)
  Put #1, , MyRecord ' ¶ÁÈëËùÓÐ×Ö·ûµ½±äÁ¿ÖÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ