ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Achive and read Database (https://www.excelbanter.com/excel-programming/338537-achive-read-database.html)

Giovanna

Achive and read Database
 
I will appreciate your helping in this matter.
I am in process of learning VBA in Excel. I wonder if somebody can help me
to achieve a sample of archive and read database program.
Basically, I want to know if I can typed information in the sheet1 then
click a macro to write it in the sheet2. Then I would like to click the macro
read data and through the pull box choose the data I want to read and located
in its respectively cells in the sheet1 (see below)

Thank you very much in advance.
Giovanna

Fron sheet1
Name Giovanna
Test # 300
Track # 5000
Date 8/30/2005

Weigths Lengths
10 100
20 200


From Sheet2
Name Test # Track # Date W1 W2 L1 L2
Giovanna 300 5000 8/29/2005 10 20 100 200
Carlos 301 4000 8/30/2005 5 7 95 205
Jose 302 3500 8/31/2005 2 4 90 100


Dnereb[_27_]

Achive and read Database
 

Since you are new to VBA, I Guess you are mixing up some things.
Excel isn't a database but a spreadsheet. Access uses a database

if I read you''re want to transport data from sheet 1 to sheet 2
I assume you meas listbox or combobox with "pull box"

I assume you want to use a form to do it.

actually it's not a thing someone will write in 5 to 10 minutes so some
pointers.

insert a form in the VBA IDE (ALT-F11) place your buttons and
combo/listbox
write your proccessing code in the form
to open your form use code like this:
Code:
--------------------
Sub test()
UserForm1.Show
End Sub
--------------------
Give the controls (buttons,boxes and so on) logical names before you
start coding like: Cmd_ArchiveToSheet2 and Cmd_RetrieveFromSheet2
It will make you type more but it will keep your code readeble.
Important one put _option_explicit__ on the top of your code modules to
forc you to declare all of your variable.


--
Dnereb


------------------------------------------------------------------------
Dnereb's Profile: http://www.excelforum.com/member.php...o&userid=26182
View this thread: http://www.excelforum.com/showthread...hreadid=399775


Giovanna

Achive and read Database
 
Dnereb;
Thank you for your advise....
Unfortunately my VBA knowledge is so low that I could not understand very
well you message. I did the buttons but I do not what to do next...
I will appreciate your helping me!!!!!!

Regards.
Giovanna

"Dnereb" wrote:


Since you are new to VBA, I Guess you are mixing up some things.
Excel isn't a database but a spreadsheet. Access uses a database

if I read you''re want to transport data from sheet 1 to sheet 2
I assume you meas listbox or combobox with "pull box"

I assume you want to use a form to do it.

actually it's not a thing someone will write in 5 to 10 minutes so some
pointers.

insert a form in the VBA IDE (ALT-F11) place your buttons and
combo/listbox
write your proccessing code in the form
to open your form use code like this:
Code:
--------------------
Sub test()
UserForm1.Show
End Sub
--------------------
Give the controls (buttons,boxes and so on) logical names before you
start coding like: Cmd_ArchiveToSheet2 and Cmd_RetrieveFromSheet2
It will make you type more but it will keep your code readeble.
Important one put _option_explicit__ on the top of your code modules to
forc you to declare all of your variable.


--
Dnereb


------------------------------------------------------------------------
Dnereb's Profile: http://www.excelforum.com/member.php...o&userid=26182
View this thread: http://www.excelforum.com/showthread...hreadid=399775




All times are GMT +1. The time now is 09:04 PM.

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