View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default 2 Questions about code with excel 97

Question 1
VBA functions and Excel functions are two different things. In Excel you use
Char where as in VBA you use Chr. Just the way it goes...

Question 2
You can rename the modules, sheets... In the View menu select Properties
Window. Beside (Name) you can change the module name. You can also change
sheet names. This is real handy. Change 'Sheet1' to shtMySheet and now you
can refer to it directly in code. This way if someone changes the tab name of
a sheet your code will not crash.

sheets("Tab Name").select

becomes

shtMySheet.select

"Rubicant" wrote:


The first question is the most important:
Why can't I use the following vb function in excel modules:
mid,left,right,chr,space but i can still use instr. Is there anything i
must click to enable theses?


The Second question is simple:
Why can't I rename the modules and they are named module1,module2 etc.
No options will allow me as I right click on them to change it. Also if
I use this code it won't work and will tell me that the function i use
is not recognized by excel: activeworkbook.modules("module1").name =
"modMain".
I really need theses informations thanks.


--
Rubicant
------------------------------------------------------------------------
Rubicant's Profile: http://www.excelforum.com/member.php...o&userid=16419
View this thread: http://www.excelforum.com/showthread...hreadid=277891