Hi everybody,
I know Excel reasonably from the last few months but I had not done much VBA until recently so please bear with me.
I have created a form using Excel that is a single A4 printable sheet, called Materials_Form. The data behind this form is stored in a single row in another sheet called Materials. I have created a Macro that when you select a row number from a cell at the top of the sheet then the rest of the information from the materials spreadsheet will be copied across. Now any changes can be made to the information by changing the cells and clicking save; the save process then writes this information back into the Materials spreadsheet for storing.
My problem comes from the fact that the form has input boxes in random places on the sheet (for easy display of information) and as such you need to run a copy process for every cell to be copied (26 of them). This makes the macro fairly slow (6 seconds or so) as opposed to a single copy with some VBA array processing which I do not understand. I have used some named cells on the form so you can sayand vice versa when saving form data,[Date_Now] = Worksheets("Materials").Cells(dbRow, 2)I have turned off ScreenUpdating but it is still slow, possibly because I have a quick check on whether the row number cell has changed at the top of the sheet. i.e. in order to update the form I update the Row number cell at the top and this triggers a cellchange which fills in the rest.Worksheets("Materials").Cells(dbRow, 2) = [Date_Now]
I hope that makes sense and I would appreciate your help in speeding the code up please!
Thanks,
Chris
Bookmarks