Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 2 Questions about code with excel 97


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
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 i
I use this code it won't work and will tell me that the function i us
is not recognized by excel: activeworkbook.modules("module1").name
"modMain".
I really need theses informations thanks

--
Rubican
-----------------------------------------------------------------------
Rubicant's Profile: http://www.excelforum.com/member.php...fo&userid=1641
View this thread: http://www.excelforum.com/showthread.php?threadid=27789

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 2 Questions about code with excel 97

for you first problem, after it occurs, reset the project, then go into
Tools=References in the VBE and you should see at least one or more entries
Marked as MISSING. You need to clean up these references as they are the
source of the problem.

--
Regards,
Tom Ogilvy

"Rubicant" wrote in message
...

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Three short questions regarding importing of data. See code Susan Hayes Excel Programming 3 August 15th 04 04:17 PM
Rounding questions: (Formula and Code) ? Stuart[_5_] Excel Programming 2 April 8th 04 07:05 PM
2 questions - Creating a TimeBomb - Securing Code David Excel Programming 6 October 21st 03 08:32 PM
Urgent questions regarding the code below Greener Excel Programming 1 October 9th 03 09:26 PM
Two Questions about the Following Block of Code Greener Excel Programming 0 October 9th 03 06:26 PM


All times are GMT +1. The time now is 07:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"