''''''******************Net Concept*************''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''Send Current Workbook Mail''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub Email() ActiveWorkbook.SendMail recipients:="rfhyd1...@gmail.com" End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''Identify Machine ID''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Option Explicit Private Declare Function GetComputerName Lib "kernel32" _ Alias "GetComputerNameA" _ (ByVal lpBuffer As String, nSize As Long) As Long Function ReturnComputerName() As String Dim rString As String * 255, sLen As Long, tString As String tString = "" On Error Resume Next sLen = GetComputerName(rString, 255) sLen = InStr(1, rString, Chr(0)) If sLen > 0 Then tString = Left(rString, sLen - 1) Else tString = rString End If On Error GoTo 0 ReturnComputerName = UCase(Trim(tString)) End Function Sub DsplyComputerName() Call ReturnComputerName MsgBox "Your Computer Name Is:" & ReturnComputerName End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''Identify Your IP Address''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Option Explicit Sub IPtest() Dim wsh As Object Dim RegEx As Object, RegM As Object Dim FSO As Object, fil As Object Dim ts As Object, txtAll As String, TempFil As String Set wsh = CreateObject("WScript.Shell") Set FSO = CreateObject("Scripting.FileSystemObject") Set RegEx = CreateObject("vbscript.regexp") TempFil = "C:\myip.txt" ' Save ipconfig info to temporary file wsh.Run "%comspec% /c ipconfig > " & TempFil, 0, True With RegEx .Pattern = "(\d{1,3}\.){3}\d{1,3}" .Global = False End With Set fil = FSO.GetFile(TempFil) ' Access temporary file Set ts = fil.OpenAsTextStream(1) txtAll = ts.ReadAll Set RegM = RegEx.Execute(txtAll) ' Return IP address to Activesheet cell A1 by parsing text ActiveSheet.Range("A1").Value = RegM(0) ActiveSheet.Range("A1").EntireColumn.AutoFit ts.Close ' Remove temp file Kill TempFil Set ts = Nothing Set wsh = Nothing Set fil = Nothing Set FSO = Nothing Set RegM = Nothing Set RegEx = Nothing End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Hope it May Help Happy to Help :) Shyam -- Thanks Regards Shyam Software Engineer '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' When one door of happiness closes, another opens; but often we look so long at the closed door that we do not see the one which has been opened for us. - Helen Keller '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Wenn eine Tür des Glücks schließt, öffnet sich ein weiteres, aber oft schauen wir so lange auf die geschlossene Tür, dass wir nicht sehen ein, die für uns geöffnet wurde. - Helen Keller '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,800 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe To unsubscribe from this group, send email to excel-macros+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
''''''******************Net Concept*************'''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''Send Current Workbook Mail''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub Email() ActiveWorkbook.SendMail recipients:="rfhyd1...@gmail.com" End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''Identify Machine ID''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Option Explicit Private Declare Function GetComputerName Lib "kernel32" _ Alias "GetComputerNameA" _ (ByVal lpBuffer As String, nSize As Long) As Long Function ReturnComputerName() As String Dim rString As String * 255, sLen As Long, tString As String tString = "" On Error Resume Next sLen = GetComputerName(rString, 255) sLen = InStr(1, rString, Chr(0)) If sLen > 0 Then tString = Left(rString, sLen - 1) Else tString = rString End If On Error GoTo 0 ReturnComputerName = UCase(Trim(tString)) End Function Sub DsplyComputerName() Call ReturnComputerName MsgBox "Your Computer Name Is:" & ReturnComputerName End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''Identify Your IP Address''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Option Explicit Sub IPtest() Dim wsh As Object Dim RegEx As Object, RegM As Object Dim FSO As Object, fil As Object Dim ts As Object, txtAll As String, TempFil As String Set wsh = CreateObject("WScript.Shell") Set FSO = CreateObject("Scripting.FileSystemObject") Set RegEx = CreateObject("vbscript.regexp") TempFil = "C:\myip.txt" ' Save ipconfig info to temporary file wsh.Run "%comspec% /c ipconfig > " & TempFil, 0, True With RegEx .Pattern = "(\d{1,3}\.){3}\d{1,3}" .Global = False End With Set fil = FSO.GetFile(TempFil) ' Access temporary file Set ts = fil.OpenAsTextStream(1) txtAll = ts.ReadAll Set RegM = RegEx.Execute(txtAll) ' Return IP address to Activesheet cell A1 by parsing text ActiveSheet.Range("A1").Value = RegM(0) ActiveSheet.Range("A1").EntireColumn.AutoFit ts.Close ' Remove temp file Kill TempFil Set ts = Nothing Set wsh = Nothing Set fil = Nothing Set FSO = Nothing Set RegM = Nothing Set RegEx = Nothing End Sub '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''