ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   New to VBA (https://www.excelbanter.com/excel-programming/322489-new-vba.html)

ccc

New to VBA
 
New to VBA however am an experienced dba. Need to create either in
Word or Excel a Template that will integrate to a database using dde
and based on the entry in the databse field import another worksheet or
paragraph into the worksheet/document. eg. Used for events
management. Based on an entry in a menu field like menu5,
automatically insert into the worksheet/template the actual menu 5.
Also need a simple way probably form based for the input of new menus
by the user.

Can anyone point me in the right direction with this. Learning VBA as
I go. Have done limited VB scripting in the past.

TIA

Jason


gocush[_29_]

New to VBA
 
You have a long list of questions. You might want to start with one at a time.
Perhaps the first is something like:
How can I integrate Excel with a db?
You can query a db like Access or SQL Server from xl with several different
ways -- 1. Using the built-in Menu item: DataGet External DataNew and
specifying the db. This method uses MS Query which is a separate program but
comes with xl. It also allows access to SQL which might interest you since
you are a dba.

2 You can use the xl Visual Basic Editor to write vba code that incorporates
an older technology DAO, or ADO which is newer and replacing DAO. Each of
these can be used to extract, edit, update, add data in a db from xl.

3. I think there are other methods but I have only used the above.

You also ask about using a form for input. Excel of course has Userform
forms which are quite capable of getting input (from controls such as check
boxes, radio buttons, textboxes, comboboxes, command buttons etc). Each of
these controls can have code behind them which is triggered as an event when
the user changes the control.

This is just general info to get you started. If, after starting, you get
back with some specifics, let us know.

"ccc" wrote:

New to VBA however am an experienced dba. Need to create either in
Word or Excel a Template that will integrate to a database using dde
and based on the entry in the databse field import another worksheet or
paragraph into the worksheet/document. eg. Used for events
management. Based on an entry in a menu field like menu5,
automatically insert into the worksheet/template the actual menu 5.
Also need a simple way probably form based for the input of new menus
by the user.

Can anyone point me in the right direction with this. Learning VBA as
I go. Have done limited VB scripting in the past.

TIA

Jason



ccc

New to VBA
 
Thanks for your reply

Perhaps I can get straight to the point I can accomplish everything
else I believe

My primary concern is how once I have retrieved the entry in the
database how can I use "variable" to insert the menu previously created
that matches the entry?

Jason

gocush wrote:
You have a long list of questions. You might want to start with one

at a time.
Perhaps the first is something like:
How can I integrate Excel with a db?
You can query a db like Access or SQL Server from xl with several

different
ways -- 1. Using the built-in Menu item: DataGet External

DataNew and
specifying the db. This method uses MS Query which is a separate

program but
comes with xl. It also allows access to SQL which might interest you

since
you are a dba.

2 You can use the xl Visual Basic Editor to write vba code that

incorporates
an older technology DAO, or ADO which is newer and replacing DAO.

Each of
these can be used to extract, edit, update, add data in a db from xl.

3. I think there are other methods but I have only used the above.

You also ask about using a form for input. Excel of course has

Userform
forms which are quite capable of getting input (from controls such as

check
boxes, radio buttons, textboxes, comboboxes, command buttons etc).

Each of
these controls can have code behind them which is triggered as an

event when
the user changes the control.

This is just general info to get you started. If, after starting,

you get
back with some specifics, let us know.

"ccc" wrote:

New to VBA however am an experienced dba. Need to create either in
Word or Excel a Template that will integrate to a database using

dde
and based on the entry in the databse field import another

worksheet or
paragraph into the worksheet/document. eg. Used for events
management. Based on an entry in a menu field like menu5,
automatically insert into the worksheet/template the actual menu 5.
Also need a simple way probably form based for the input of new

menus
by the user.

Can anyone point me in the right direction with this. Learning VBA

as
I go. Have done limited VB scripting in the past.

TIA

Jason




gocush[_29_]

New to VBA
 
I'm sorry I still am not sure what you mean by:

"once I have retrieved the entry in the database"

and

"how can I use "variable" to insert the menu previously created
that matches the entry"

I assume you mean by: "retrieved the entry in the database"
"Once you have extracted data from an external source and returned the
data to an excel range"

and I am guessing that the menu part is perhaps an item the user selects
from a drop-down combobox and you want to assign a variable to the value that
the user selects, then maybe find a match to something somewhere.

Please be more specific.



"ccc" wrote:

Thanks for your reply

Perhaps I can get straight to the point I can accomplish everything
else I believe

My primary concern is how once I have retrieved the entry in the
database how can I use "variable" to insert the menu previously created
that matches the entry?

Jason

gocush wrote:
You have a long list of questions. You might want to start with one

at a time.
Perhaps the first is something like:
How can I integrate Excel with a db?
You can query a db like Access or SQL Server from xl with several

different
ways -- 1. Using the built-in Menu item: DataGet External

DataNew and
specifying the db. This method uses MS Query which is a separate

program but
comes with xl. It also allows access to SQL which might interest you

since
you are a dba.

2 You can use the xl Visual Basic Editor to write vba code that

incorporates
an older technology DAO, or ADO which is newer and replacing DAO.

Each of
these can be used to extract, edit, update, add data in a db from xl.

3. I think there are other methods but I have only used the above.

You also ask about using a form for input. Excel of course has

Userform
forms which are quite capable of getting input (from controls such as

check
boxes, radio buttons, textboxes, comboboxes, command buttons etc).

Each of
these controls can have code behind them which is triggered as an

event when
the user changes the control.

This is just general info to get you started. If, after starting,

you get
back with some specifics, let us know.

"ccc" wrote:

New to VBA however am an experienced dba. Need to create either in
Word or Excel a Template that will integrate to a database using

dde
and based on the entry in the databse field import another

worksheet or
paragraph into the worksheet/document. eg. Used for events
management. Based on an entry in a menu field like menu5,
automatically insert into the worksheet/template the actual menu 5.
Also need a simple way probably form based for the input of new

menus
by the user.

Can anyone point me in the right direction with this. Learning VBA

as
I go. Have done limited VB scripting in the past.

TIA

Jason






All times are GMT +1. The time now is 02:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com