Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all, I am in tension because this particular code is not working in my project. ActiveCell.Value = Environ("USERNAME") When I compile my project the cursor highlights this code and the reference book gets open automatically. Please suggest. Regards Heera Chavan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Break the line up into to line to help find the problem. I think the active
cell is the issue. You may have a workbook that is opening on a chart page and not a worksheet page which is giving you the problem, the cell is protected, or you are trying to write to a merge cell and not using the first cell or the merged group. UserName = Environ("USERNAME") ActiveCell.Value = UserName "Heera" wrote: Hi all, I am in tension because this particular code is not working in my project. ActiveCell.Value = Environ("USERNAME") When I compile my project the cursor highlights this code and the reference book gets open automatically. Please suggest. Regards Heera Chavan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
tried it but it says compile error:
can't find project or libary. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Add a message box to find out what the UserName is set to.
UserName = Environ("USERNAME") msgbox(UserName) ActiveCell.Value = UserName If there is no username being display you have to find out what envirnomental properties are set in you PC. From XP Start - run type in the run box the following : cmd.exe A shell window will appear Type this at the command prompt : Set Your properties will be seen in this window. From vista Start - Search In the Search box type : CMD A shell window will appear Type this at the command prompt : Set Your properties will be seen in this window. "Heera" wrote: tried it but it says compile error: can't find project or libary. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Go into the VB editor and click Tools/References from its menu bar (could
take a few seconds for something to happen, so don't panic if it does)... is anything marked as "MISSING"? If so, put a check mark in its box, hit OK and then try your code again. -- Rick (MVP - Excel) "Heera" wrote in message ... tried it but it says compile error: can't find project or libary. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Rick your suggesstion was more appropriate......Joel your
trick helped me to increase my knowledge.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
environ username vs. application username | Excel Programming | |||
"filename is locked for editing by username" | Excel Discussion (Misc queries) | |||
Save active sheet as "filename" on a remote server with username and password | Excel Programming | |||
Environ("username") | Excel Programming | |||
Including Environ Username in Cell | Excel Worksheet Functions |