export data from a userform to a form in whorksheet

s_samira_21

New Member
Joined
Sep 11, 2014
Messages
9
Hi


I Have a userform that I really liked to print it. But I could nt find a way to do it as well as I want.


so I accepted My friends advice and I made a form in sheet1 and I want to send the data from userform to the sheet form and then print it.


I know this code is correct when the cells are one after the other:


dim i , ary


ary=array(txt1,txt2,txt3)


for i=0 to 2
cells(1,i+1)=ary(i).text
next i


but in my form the cells that shoud keep my data are seperated


for example one is a10 and on other as on d18 ,.....


so can I create an array that contains all my cells and then I use something like this:


dim i , ary,ary2


ary=array(txt1,txt2,txt3)
ary2=array(A10,D18,E8)


for i=0 to 2
ary2(i)=ary(i).text
next i


Thanks


Regards
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,225,476
Messages
6,185,205
Members
453,283
Latest member
Shortm88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top