Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
delete modules and sheets | Excel Programming | |||
Importing Modules From Other Workbooks | Excel Programming | |||
Newbie question, XL2003, VBA deleting/adding modules in multiple workbooks | Excel Programming | |||
Updating VBA Modules and Forms in User Workbooks | Excel Programming | |||
using forms and modules in multiple workbooks | Excel Programming |