dbTalk Databases Forums  

Pasting data from Excel

comp.database.ms-access comp.database.ms-access


Discuss Pasting data from Excel in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ramesh Kumar Bhandari
 
Posts: n/a

Default Pasting data from Excel - 08-05-2004 , 07:31 PM






I have a form having five textbox controls txt_1..txt_5. The data that
I want to assign to these controls are located in an excell sheet at
A1..A5. How is it possible to assign the first cell value to txt_1,
the second to txt_2 and so on by copying the whole cell range and then
clicking on some command button on the form? Your suggestion is highly
appreciated.

Reply With Quote
  #2  
Old   
Hussein b. Mohamed
 
Posts: n/a

Default Re: Pasting data from Excel - 08-06-2004 , 01:36 AM






You have to add in MIcrosoft Excel Common Controls to your form.
You can refer to the online help to get the source code.



bhandaritwo (AT) yahoo (DOT) com (Ramesh Kumar Bhandari) wrote in message news:<ed1fc058.0408051631.70a4d1c0 (AT) posting (DOT) google.com>...
Quote:
I have a form having five textbox controls txt_1..txt_5. The data that
I want to assign to these controls are located in an excell sheet at
A1..A5. How is it possible to assign the first cell value to txt_1,
the second to txt_2 and so on by copying the whole cell range and then
clicking on some command button on the form? Your suggestion is highly
appreciated.

Reply With Quote
  #3  
Old   
Ray
 
Posts: n/a

Default Re: Pasting data from Excel - 08-06-2004 , 10:48 PM



bhandaritwo (AT) yahoo (DOT) com (Ramesh Kumar Bhandari) wrote in message news:<ed1fc058.0408051631.70a4d1c0 (AT) posting (DOT) google.com>...
Quote:
I have a form having five textbox controls txt_1..txt_5. The data that
I want to assign to these controls are located in an excell sheet at
A1..A5. How is it possible to assign the first cell value to txt_1,
the second to txt_2 and so on by copying the whole cell range and then
clicking on some command button on the form? Your suggestion is highly
appreciated.
Hello Ramesh,

I've got a couple questions. Is this to be a once off event?
Or done on a regular basis? Are the Cell locations A1 to A5
consistant or do they change for the data to be used?

With the above questions answered, it will be easier to
give you answer you can use.

Regards,

Ray


Reply With Quote
  #4  
Old   
Ramesh Kumar Bhandari
 
Posts: n/a

Default Re: Pasting data from Excel - 08-07-2004 , 10:31 AM



Thank you all for the replies.

Finally I have solved the problem. I wanted to access the data via the
clipboard rather than directly from the excel. Using some windows API
functions I obtained the clipboard content in text format. The text
data was delimited with tabs and/or carriage returns, which I parsed
into an array. Then I sequencially filled in the textboxes in the
form. For the time being, this functionality is exactly what I was
looking for.

Regards,
Ramesh

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.