Thread: Macro Help
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Macro Help

This is a sample:

Sub demo()
For i = 1 To 10
MsgBox (Cells(i, "A").Value)
Next
End Sub

To enter:
1. touch ALT-F11 to bring up VBE window
2. ALT-I
ALT-M to insert a fresh module
3. paste the stuff in and close the VBE window
--
Gary's Student
gsnu200706


"Ldyflyr" wrote:

Hi:

I have 10 rows of data. I want to cretae a macro and have it loop through
the 10 lines. I think I have to go into Visual Basic and tell it something
like:

for x=10
{macro code}
Next x

But I am not sure of the syntax, or where exatcly it goes in the program.
Can someone help?

Thanks