Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone explain to me how the Environ () works. I saw it been used in
another example code here as follows: Private Sub Workbook_Open () Dim myB as Workbook If Environ("COMPUTERNAME") = "janphi" Then I tried to use the same concept for my code: If Environ("COMPUTERNAME") = "Work_Laptop" Then Else InputForm1.Show End If but the InputForm1 still come up. I want InputForm1 to only load when someone else opens the file but when I open the file from my computer, I don't want it to open. That is what I am trying to accomplish. Any ideas? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ayo
Try the below in your immediate window and compare the name with what you have given "Work_Laptop" ?Environ("COMPUTERNAME") I would suggest to use Environ("USERNAME") . If this post helps click Yes --------------- Jacob Skaria "Ayo" wrote: Can someone explain to me how the Environ () works. I saw it been used in another example code here as follows: Private Sub Workbook_Open () Dim myB as Workbook If Environ("COMPUTERNAME") = "janphi" Then I tried to use the same concept for my code: If Environ("COMPUTERNAME") = "Work_Laptop" Then Else InputForm1.Show End If but the InputForm1 still come up. I want InputForm1 to only load when someone else opens the file but when I open the file from my computer, I don't want it to open. That is what I am trying to accomplish. Any ideas? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If Environ("USERNAME") < "janphi" Then
InputForm1.Show End If "Ayo" wrote in message ... Can someone explain to me how the Environ () works. I saw it been used in another example code here as follows: Private Sub Workbook_Open () Dim myB as Workbook If Environ("COMPUTERNAME") = "janphi" Then I tried to use the same concept for my code: If Environ("COMPUTERNAME") = "Work_Laptop" Then Else InputForm1.Show End If but the InputForm1 still come up. I want InputForm1 to only load when someone else opens the file but when I open the file from my computer, I don't want it to open. That is what I am trying to accomplish. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Environ user tracking | Excel Programming | |||
Environ function. | Excel Programming | |||
Environ Function | Excel Programming | |||
Environ() | Excel Programming | |||
Environ()- help | Excel Programming |