Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Class lists | Excel Discussion (Misc queries) | |||
Class not registered | Excel Discussion (Misc queries) | |||
RaiseEvent from a class contained in a 2nd class collection? | Excel Programming | |||
Class Question | Excel Programming | |||
Class modules | Excel Programming |