2024-05-17 00:50:35
'获取用户名
Function username()
username = Environ("username")
End Function
'获取IP地址
Function ip()
cmd = "cmd /c ipconfig|findstr ""IPv4"""
Set w = CreateObject("wscript.shell")
Set we = w.exec(cmd)
r = we.stdout.readall
ip = Trim(Split(r, ":")(1))
End Function
2024-05-17 13:49:02
2024-05-17 01:42:39
不要这样的 。我想 让ip直接出现在表格里
cells(1,1)=IP
把代码修改一下就好了
2024-05-17 00:19:38