Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Please explain modules/sheets/workbooks

Hello,
I am new to VBA, but I have been programming for many years. I am
trying to sort out the difference between a module, a worksheet, and a
workbook. In a single project, I can write code in a module, and/or a
worksheet, and/or a workbook. And if I write code in sheet 1, I can
use it to access all the other sheets in the project. So why is VBA
set up this way? What is the difference between a module, a sheet,
and a workbook? And how does it benefit me to have all these places
to write code, as opposed to just a single code location?

thanks for the help
Andrew

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Please explain modules/sheets/workbooks

A module is where the Visual Basic code is stored. There are different types
of modules. A general module is one from which your code can access all
workbooks, worksheet, UserForms, controls and other applications. A sheet
module is contained within a specific sheet and has limited ability for the
code to access and execute out side that sheet. The controls modules apply
to each individual control.

Workbooks are collections of sheets that can be used to organize a project,
maintain similar type records or if desired store various data files.

A worksheet or sheet within the workbook is a defined set of ranges (in
Excel 2003 it is 256 x 65536 cells) Worksheet refers to the Excel
spreadsheet format while Sheet can be either the spreadsheet or a chart.

There are websites that have basic beginner examples and explanations. One
of them is:

http://www.excel-vba.com/excel-vba-contents.htm



"Andrew" wrote:

Hello,
I am new to VBA, but I have been programming for many years. I am
trying to sort out the difference between a module, a worksheet, and a
workbook. In a single project, I can write code in a module, and/or a
worksheet, and/or a workbook. And if I write code in sheet 1, I can
use it to access all the other sheets in the project. So why is VBA
set up this way? What is the difference between a module, a sheet,
and a workbook? And how does it benefit me to have all these places
to write code, as opposed to just a single code location?

thanks for the help
Andrew


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default Please explain modules/sheets/workbooks

While you're on a roll (thank you), would you give a similar overview
of controls:
1) from the forms toolbar
2) from the Visual Basic Toolbar
3) from the Toolbox in the VBA IDE
Thanks, D-C

JLGWhiz wrote:
A module is where the Visual Basic code is stored. There are different types
of modules. A general module is one from which your code can access all
workbooks, worksheet, UserForms, controls and other applications. A sheet
module is contained within a specific sheet and has limited ability for the
code to access and execute out side that sheet. The controls modules apply
to each individual control.

Workbooks are collections of sheets that can be used to organize a project,
maintain similar type records or if desired store various data files.

A worksheet or sheet within the workbook is a defined set of ranges (in
Excel 2003 it is 256 x 65536 cells) Worksheet refers to the Excel
spreadsheet format while Sheet can be either the spreadsheet or a chart.

There are websites that have basic beginner examples and explanations. One
of them is:

http://www.excel-vba.com/excel-vba-contents.htm



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default Please explain modules/sheets/workbooks

I didn't mean to ask for an overview of the many individual controls,
but the difference between the groups of controls.
Such as (3) being only for Userforms?
And (2) being similar to (1) with events added?
Is there more to say?

D-C wrote:
While you're on a roll (thank you), would you give a similar overview
of controls:
1) from the forms toolbar
2) from the Visual Basic Toolbar
3) from the Toolbox in the VBA IDE



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Please explain modules/sheets/workbooks

A&A - PRESTAÇÃO DE SERVIÇO.

Melhore suas planilhas!

- Deixe-as mais rápidas
- Torne-as mais funcionais
- Aplique lay-outs mais modernos
- Melhore a apresentação dos seus dados
- impressione os gerentes e a diretoria

Crie o seu M.I.S. personalizado, desenvolva um Dataware, implemente
seu BI.

- Envie dados do seu Banco de Dados
diretamente para a sua aplicação

- Recolha informações diretamente da
Web (Cotações, Taxas, Alíquotas, etc...)

Programação VBA, Reports, Dashboards, Pivot Tables (Tabelas
Dinmicas), Ordenações, Agrupamentos, Interfaces, etc. . .

Entre em contato. Prestamos serviço diretamente pela Internet.

Você envia e implementamos sua solicitação.

Também desenvolvemos aplicações MS Access.

Mail:



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Please explain modules/sheets/workbooks

A&A - PRESTAÇÃO DE SERVIÇO.

Melhore suas planilhas!

- Deixe-as mais rápidas
- Torne-as mais funcionais
- Aplique lay-outs mais modernos
- Melhore a apresentação dos seus dados
- impressione os gerentes e a diretoria

Crie o seu M.I.S. personalizado, desenvolva um Dataware, implemente
seu BI.

- Envie dados do seu Banco de Dados
diretamente para a sua aplicação

- Recolha informações diretamente da
Web (Cotações, Taxas, Alíquotas, etc...)

Programação VBA, Reports, Dashboards, Pivot Tables (Tabelas
Dinmicas), Ordenações, Agrupamentos, Interfaces, etc. . .

Entre em contato. Prestamos serviço diretamente pela Internet.

Você envia e implementamos sua solicitação.

Também desenvolvemos aplicações MS Access.

Mail:

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
delete modules and sheets mike allen[_2_] Excel Programming 1 January 9th 07 02:47 PM
Importing Modules From Other Workbooks Jim Jackson Excel Programming 2 July 14th 06 07:55 PM
Newbie question, XL2003, VBA deleting/adding modules in multiple workbooks KR Excel Programming 6 May 1st 06 08:43 PM
Updating VBA Modules and Forms in User Workbooks Joe 90[_2_] Excel Programming 0 April 28th 04 10:23 PM
using forms and modules in multiple workbooks scrabtree23[_2_] Excel Programming 1 November 11th 03 10:57 PM


All times are GMT +1. The time now is 09:19 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"