excel userform save problem

  • Thread starter Pierre via OfficeKB.com
  • Start date
P

Pierre via OfficeKB.com

Hi,

i have the following problem:

I built an application that uses two sheets for database purposes.
The application is distributed through to many collegues.

When i update the application, all data in the databases will be lost because
i just save the new application over the old one. I would like to be able to
update the application and leave the database intact.

my questions
- Is it possible to do that by making two workbooks like 1 workbook for the
application and one for the database ?
- is it possible to save to a database workbook that is not opened ?
- is it possible to retrieve data form a database workbook that is not opened
?

- is there some way of making it one file consisting of two workbooks?

Ik hope somebody has the answers for me.
Thanks,
Pierre
 
T

Tom Ogilvy

You should put your code in an addin.

So yes, separating your code from the data is the solution.

http://support.microsoft.com/?id=156942
XL97: How to Create an Add-in File in Microsoft Excel 97


http://support.microsoft.com/?id=211563
How to create an add-in file in Excel 2000


http://msdn.microsoft.com/library/en-us/odeopg/html/deovrexceladdins.asp


http://msdn.microsoft.com/library/en-us/odeopg/html/deovrcreatingexce...


http://www.j-walk.com/ss/excel/tips/tip45.htm
Excel 97: Creating Add-Ins


http://support.microsoft.com/?id=167909
XL: Securing Visual Basic Code in Microsoft Excel
 
P

Pierre via OfficeKB.com

Hi Tom,

Thanks for your suggestions...as always !
But...
- My application is hidden.
- The user only sees the userform.
- in the application i have a 2 database sheets called 'database' and
'dbasedlnrs'.
Now, when i update the apllication because i have a newer and better
(hopefully) version, all data is lost in the database and dbasedlnrs sheets
because i just copy the new application file over the old file.

Therefore i though it might be an idea to seperate the database sheet from
the application, but i don not know how....

Would it be possible to make the database sheets an addin that is loaded with
the application and if this is possible, how o i go about this ?

Thanks Tom
Pierre


Tom said:
You should put your code in an addin.

So yes, separating your code from the data is the solution.

http://support.microsoft.com/?id=156942
XL97: How to Create an Add-in File in Microsoft Excel 97

http://support.microsoft.com/?id=211563
How to create an add-in file in Excel 2000

http://msdn.microsoft.com/library/en-us/odeopg/html/deovrexceladdins.asp

http://msdn.microsoft.com/library/en-us/odeopg/html/deovrcreatingexce...

http://www.j-walk.com/ss/excel/tips/tip45.htm
Excel 97: Creating Add-Ins

http://support.microsoft.com/?id=167909
XL: Securing Visual Basic Code in Microsoft Excel
[quoted text clipped - 19 lines]
Thanks,
Pierre
 
T

Tom Ogilvy

Put the database sheets in one workbook

Put all you code and useform in another workbook and make that an addin (or
not - your choice)

Have the code refer to the worksheets in the database workbook rather than
in the addin itself.

If the database is hidden, then you can still refer to it by fully
qualifying your code

LastRow = Workbooks("Database.xls").Worksheets( _
"Sheet3").Cells(Rows.count,1).end(xlup).row

will work fine as long as Database.xls is open - it doesn't have to be
visible.

this will allow you to just overwrite the workbook with the code and the
database workbook will remain untouched.

--
Regards,
Tom Ogilvy


Pierre via OfficeKB.com said:
Hi Tom,

Thanks for your suggestions...as always !
But...
- My application is hidden.
- The user only sees the userform.
- in the application i have a 2 database sheets called 'database' and
'dbasedlnrs'.
Now, when i update the apllication because i have a newer and better
(hopefully) version, all data is lost in the database and dbasedlnrs sheets
because i just copy the new application file over the old file.

Therefore i though it might be an idea to seperate the database sheet from
the application, but i don not know how....

Would it be possible to make the database sheets an addin that is loaded with
the application and if this is possible, how o i go about this ?

Thanks Tom
Pierre


Tom said:
You should put your code in an addin.

So yes, separating your code from the data is the solution.

http://support.microsoft.com/?id=156942
XL97: How to Create an Add-in File in Microsoft Excel 97

http://support.microsoft.com/?id=211563
How to create an add-in file in Excel 2000

http://msdn.microsoft.com/library/en-us/odeopg/html/deovrexceladdins.asp

http://msdn.microsoft.com/library/en-us/odeopg/html/deovrcreatingexce...

http://www.j-walk.com/ss/excel/tips/tip45.htm
Excel 97: Creating Add-Ins

http://support.microsoft.com/?id=167909
XL: Securing Visual Basic Code in Microsoft Excel
[quoted text clipped - 19 lines]
Thanks,
Pierre
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top