Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default class? Compile? XLA?

I wrote several VBA macros and functions, usually creating a module inside
some Workbook and not bothering about anything else.
I have few questions about this:
1. as I can store macro in Workbook instead of Module for a specific book,
why should I create a Module?
2. VBA Class - what is this for? - Can I really write a VBA class with its
methods and properties? (few links to tutorials are welcome)
3. XLA - i used this to store some often used functions to be accessible to
all books - Is this the right way and the only function of XLA?
4. Compile option - What really it does? Is there some compiled exe behind
the workbook?
5. Microsoft Script Editor - What can I do with MSEditor? I'm know ASP, is
it possible to make interactive XLS (on server) that is updateable from
client to server?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default class? Compile? XLA?

1. Modules vs Workbook code? It's much easier to write code in modules that
work for a specific purpose, and import/export these amongst different
projects.

e.g. I usually have a menu control module, form routines module, wheel
handler module, which get loaded into just about every new project.

2. Class Modules? Yes, you can write your own classes.

A simple example using properties and methods to create a powerful progress
bar tool is he

http://www.enhanceddatasystems.com/E...rogressBar.htm

You also need to use classes to trap application events. This is a simple
class module used for Excel function access to our databases:

Public WithEvents App As Application
Private Sub App_SheetCalculate(ByVal Sh As Object)
'turn off the connection flag to our databases here
End Sub

3. Use of XLAs? It's very useful for functions but also for more general
routines that can then be accessed via the add-in menu, loaded on demand,
loaded always, etc.

4. Compiling? It checks that variable assignments match the correct type,
that syntax is correct in your statements. You should always put Option
Explicit at the top of every module and do a compile before you release your
work as a good way of trapping programming errors and typos.

5. MSE? There's no reason you would use it within the office environment
unless you are a serious masochist. Yes, it can be used as an editor for asp
pages but I have never found it useful. I tend to use the editor in
Dreamweaver although there are now fully specced asp editors out there at a
price. You can create an instance of Excel at a server that has Excel
installed using Server.CreateObject, or you can look into the office web
components. Long topics.

Robin Hammond
www.enhanceddatasystems.com

"Juggernath" wrote in message ...
I wrote several VBA macros and functions, usually creating a module inside
some Workbook and not bothering about anything else.
I have few questions about this:
1. as I can store macro in Workbook instead of Module for a specific book,
why should I create a Module?
2. VBA Class - what is this for? - Can I really write a VBA class with its
methods and properties? (few links to tutorials are welcome)
3. XLA - i used this to store some often used functions to be accessible

to
all books - Is this the right way and the only function of XLA?
4. Compile option - What really it does? Is there some compiled exe behind
the workbook?
5. Microsoft Script Editor - What can I do with MSEditor? I'm know ASP, is
it possible to make interactive XLS (on server) that is updateable from
client to server?




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
Class lists Andmor Excel Discussion (Misc queries) 1 November 22nd 06 05:34 PM
Class not registered DavidH Excel Discussion (Misc queries) 0 April 16th 06 10:40 PM
RaiseEvent from a class contained in a 2nd class collection? Andrew[_16_] Excel Programming 2 January 6th 04 04:22 PM
Class Question John T Ingato Excel Programming 2 November 7th 03 12:09 PM
Class modules pk Excel Programming 2 October 3rd 03 03:45 AM


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

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

About Us

"It's about Microsoft Excel"