在下面的语句中,我想实现写入私网IP.txt时 本地连接 前后是双引号,应该怎样做
在VB中难道无法使用双引号吗Open App.Path & "\私网IP.txt" For Output As #1
    
   
Print #1, "set address name = " & "'本地连接'" & "gateway=192.168.1.1"    Close #1

解决方案 »

  1.   

    Print #1, "set address name = ""本地连接""gateway=192.168.1.1"
      

  2.   

    Print #1, "set address name = " & Chr(34) & "本地连接" & Chr(34) &  "gateway=192.168.1.1"
      

  3.   

    Open App.Path & "\私网IP.txt" For Output As #1   
        Print #1, "set address name = " & "“ 本地连接 “" & "gateway=192.168.1.1"
     Close #1
    把双引号改为汉字输入方式。
      

  4.   

    MsgBox "set address name = " & """" & "本地连接" & """" & "gateway=192.168.1.1"
    看明白了吗?试验一下就知道了,抢分~~~