ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Get VBA procedures from DB (https://www.excelbanter.com/excel-programming/366171-get-vba-procedures-db.html)

Hiran de Silva[_2_]

Get VBA procedures from DB
 
Hi,

Have anyone got a workable plan for this?

I want a 'light' Excel 2000 workbook to get VBA code from a (SQL Server
2000) database and run it. ie. to create an Excel application 'on the fly'.

The plan is to distribute a generic workbook to users around the world, so
that we can keep adding and improving features indefinitely.

All thoughts welcome.
Thanks,
Hiran




John.Greenan

Get VBA procedures from DB
 
It's would not be a "light" workbook, it's quite heavy.

Assuming you follow the usual way of extracting data from MSSQL (ADO on top
of OLEDB) you will need to have code to

1. Connect to the database.
2. Select the 'correct' code
3. Access the workbook to either add the code or create a reference to a
downloaded code object.

So, you have to ensure that the user has ADO, trusts access to the excel
development environment and/or has a certificate for your code installed.

This is basically a bad idea - try another way. Good luck


--
www.alignment-systems.com


"Hiran de Silva" wrote:

Hi,

Have anyone got a workable plan for this?

I want a 'light' Excel 2000 workbook to get VBA code from a (SQL Server
2000) database and run it. ie. to create an Excel application 'on the fly'.

The plan is to distribute a generic workbook to users around the world, so
that we can keep adding and improving features indefinitely.

All thoughts welcome.
Thanks,
Hiran





Hiran de Silva[_2_]

Get VBA procedures from DB
 
Hi John,

Thanks.
I'm ok with steps 1 and 2.
On Step 3 I will need to put the VBA code in a text field from a
'development Excel workbook' with some sort of carriage return delimiters, I
guess. Is there a tool for this?
Then, putting the retrieved code into the Client workbook - I found a
tutorial in Chip Pearson's site (thanks Chip).

An example would be nice. Anybody?

BTW 'light' workbook because all it will have will be code for (1) a
connection (2) which code to retrieve. (a 15k file?)

Thanks in advance,
Hiran






John.Greenan

Get VBA procedures from DB
 
it's not that simple. You cannot easily add lots of code to an excel
workbook. I suggest you have a try and then re-design when you get stuck.

good luck

--
www.alignment-systems.com


"Hiran de Silva" wrote:

Hi John,

Thanks.
I'm ok with steps 1 and 2.
On Step 3 I will need to put the VBA code in a text field from a
'development Excel workbook' with some sort of carriage return delimiters, I
guess. Is there a tool for this?
Then, putting the retrieved code into the Client workbook - I found a
tutorial in Chip Pearson's site (thanks Chip).

An example would be nice. Anybody?

BTW 'light' workbook because all it will have will be code for (1) a
connection (2) which code to retrieve. (a 15k file?)

Thanks in advance,
Hiran








All times are GMT +1. The time now is 01:40 PM.

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