#1
|
|||
|
|||
automated form filling routine / process
I am trying to create a routine in excel where the information is retrieved from the database worksheet and this is subsequently processed x times into another worksheet with additional information which is different each time. I know it requires the use of a loop setup to replicate the data from the excel database, but I can’t seem to work out how to make it stop to allow me to input the additional data each time before it transfers to another worksheet to insert this data and save before repeating the process until it has completed the no of repetitions.
Each time it creates a form the heading will say recommendation y of x where x is the no of times it is repeated and y is the current value of x. The data is mainly text. Any help gratefully appreciated. Regards Colin |
#2
|
||||
|
||||
It is not clear what you are trying to do, but what you describe is a basic loop process e.g. Run the sub Example to call the other sub three times. If you want more information you will have to supply more detail.
Code:
Sub Example() DoSomething 3 End Sub Sub DoSomething(x As Long) Dim y As Long For y = 1 To x 'do stuff e.g. MsgBox y Next y End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Filling in email from form | eldublu | Outlook | 1 | 03-07-2014 10:55 AM |
Word form - created successfully, problem filling out | Bibi_D | Word | 2 | 07-29-2013 01:53 AM |
Text Form Fields - Filling the table cell | simville02 | Word Tables | 1 | 01-31-2013 11:12 PM |
Data got getting returned from Sub Routine | Hwyn | Excel Programming | 5 | 01-18-2012 08:02 AM |
Macro or routine required | evanhughes | Outlook | 0 | 11-18-2011 02:56 AM |