new to macros and vba

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

I have written a spreadsheet, with pages 1,2,3,4. I want to take data
from these pages and collect it permanently onto page 5. I want to
later clear the data on page 1,2,3,4 and recollect new data to be
entered onto the next vacant row on page 5. I believe the copy,paste
special will place my formulas on the first row of page 5 and make
them permanent data. How may I add another macro to choose the next
available line selection to that vacant starting row and column ?
When I connect these two macros together to run as one,line selection
would seem to be first and then data transfer, is that correct? Can I
also link this data to a button, to be placed on my spreadsheet? How
do I link the button to the macros?

Tnx,

Jim
 
Good questions, though some are probably too general for this forum.

Specifically, yes, if you have two macros, one to select the next
available cell and another to copy data from somewhere else, you would
put one after the other.

You might want to start with an introductory book on the subject of
programming or some of material available online. Here are a few
references:

Excel for Windows Visual Basic for Applications 101
http://support.microsoft.com/default.aspx?
scid=/support/excel/content/vba101/default.asp

Working with Microsoft Excel Objects
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/modcore/html/deovrWorkingWithMicrosoftExcelObjects.asp

Getting Started with Macros and User Defined Functions
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Beyond the macro recorder
http://www.tushar-
mehta.com/excel/vba/beyond_the_macro_recorder/index.htm

You might also want to read about how to store macros as add-ins,
though it might be a bit too advanced for someone just getting started.
Nonetheless, check http://www.google.com/groups?
selm=MPG.185a8ddd52ccd5ce98a88c%40msnews.microsoft.com

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Also, an easy way to learn VBA (at least the basics) is to record
macros and then go look at the module it created to see what it did.

But remember to be specific, if you want to take data from one sheet,
find the next open cell in a range and paste it, don't find the empty
cell yourself, otherwise the the module will just be writing to the
range you selected every time. You have to think about the process
behind it. In your instance a simple way, albeit a crude one, would
be to record a macro using the find function from the menu and looking
for "" within a range and then pasting to it.

Try it out. Also, if you want to get a book, Wallkenbach's Power
Programming with VBA is great. I am new to this group so I don't know
what everyone's opinion is on that one, but I heard Wallkenbach stops
by this group from time to time to answer questions.

Good luck,
-Joel
 
Back
Top