is it POSSIBLE to create a Database in excel using VBA...
"Senthil" wrote in message
...
Hello friends,
I have unique requirement, I'm looking to understand the possibility to
create a database using VBA in excel where the user can uplad attachments
as
well. Below are the actions/formats required.
1) Create a form for the users enter the data.
2) Multiple user should be able to use the form and the information should
get updated in a master workbook/sheet.
3)Users should be able to upload an attachment using the form as well.
4)need to create a search and sorting (user, file # wise...etc) criteria
so
that the data can be retrived easily for future reference and audit.
5) If a row is selected in the database and clicked - it should show all
the
attachment realated to it. So that ppl can retrive the attachment as well.
6) Should be able to run reporting to analyze the data as well.
Constrains - This is for team of 10 users, unfortuantely we don't have
financial aid nor required skills to create a tool in SQL or DotNet or
MS-ACCESS. We want to keep it simple so that anyone in the team can
improvise
it later. The main constrain being to upload attachment and retrive it.
This database will be created in shared network, so that all the users can
access it.
Hope i didn't confuse it, however pls do drop an email if you have
questions
and suggestions. I have very tight dead line to implement a data tracker
(its
my idea to add the attachment as well so that we have all the relevent doc
in
one place)..
Thanks in advance!
Senthil
Yes Excel can be used to act as a DataBase! However, as far as attachments,
it will depend what you want to attach, and how the Data is to be used.
As for using as a DataBase, a simple Compare sub is needed, the sub below is
extended to show you an example of how to compare elements opposed to the
complete value in a cell.
--
Public Sub BasicDataBaseSub()
Dim GetDate, GetDay, GetMonth, GetYear
GetDate = TextBox1.Text ' TextBox1 contains the Text you wish to compare
GetDay = Day(GetDate)
GetMonth = Month(GetDate)
GetYear = Year(GetDate)
Sheets("SHEETNAME").Select ' Add the Worksheet name you wish to run the sub
on
For a = 1 To 100 ' Change to the required Cell Range ie A50:A149 change to
For a = 50 to 149
CheckDay: ' Change sub to whatever you wish. Be aware that you may need to
alter the name to ensure you don't clash with pre-defined sub names
b = Day(Cells(a, 2)) ' Cells(a, #) where # is the Column number ie B=2 C=3
D=4 etc
If b = GetDay Then GoTo CheckMonth
GoTo Skip ' If more than 1 compare, add a 'Skip' sub to bypass code between
success when comparing Cells and what you require as a result
CheckMonth:
c = Month(Cells(a, 2))
If c = GetMonth Then GoTo CheckYear
GoTo Skip
CheckYear:
d = Year(Cells(a, 2))
If d = GetYear Then GoTo Success
Skip:
Next a
GoTo Exit1 ' Use this when comparison fails in all Cells
Success:
' Use this area to apply code required when comparison is 100% successful
Exit1:
End Sub
--
|