Right now I have a form that displays the MAC address in a label called MACAddressLabel and it displays the Computer Name in a label called ComputerNameLabel.
Complements of SonOfEmidec1100, this is how I am displaying my Computer Name
mystring = Environ("ComputerName")
ComputerNameLabel.Caption = mystring
and this is how I am displaying the MAC Address
MACAddressLabel.Caption = GetMACAddress(" - ")
(keep in mind there is more code that goes with these lines of code but they arent't relevent for the If/Else If Statement)
The form currently displays both the MAC address and the Computer Name (if there is no MAC Address then it just displays zeros). I would like for it to only display the MAC Address if there is one but if there isn't then I want it to display just the Computer Name instead. Can someone help me out with some VBA that I could use for this situation?
Thanks!!
ML
Complements of SonOfEmidec1100, this is how I am displaying my Computer Name
mystring = Environ("ComputerName")
ComputerNameLabel.Caption = mystring
and this is how I am displaying the MAC Address
MACAddressLabel.Caption = GetMACAddress(" - ")
(keep in mind there is more code that goes with these lines of code but they arent't relevent for the If/Else If Statement)
The form currently displays both the MAC address and the Computer Name (if there is no MAC Address then it just displays zeros). I would like for it to only display the MAC Address if there is one but if there isn't then I want it to display just the Computer Name instead. Can someone help me out with some VBA that I could use for this situation?
Thanks!!
ML