LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need Help With Creating A Loop

Then it is as I said

Dim rng as Range
Dim sh as Worksheet
With Worksheets("PackingData")
set rng = .Range(Range("B2"),.Range("B2").End(xldown))
End With

for each cell in rng
set rw = cell.Resize(1,58)
set sh = activeSheet
Worksheets("PackingData").Select
rw.Select
' code to process the selected line/packing slip
Next

--
Regards,
Tom Ogilvy



"zero635" wrote in
message ...

The macro I use is for packing slip. Line B2:BG2 house the information
for the packing slip. It includes data such has address, name, number,
etc. In the spreadsheet I am using I have say 15 lines 2 thru 16. When
I hit my macro it copies that line inserts it into the specified
template and then does the rest of my programming, taking out lines,
inserting, etc. But for me to do each line for each packing slip I
have to highlight the individual lines and hit the macro button for it
to go through it. I am trying to automate to do the first packing
slip, move to the next line setup that one, go on to the next line,
etc.. Everything that I have works so far, I didn't want to post all
my code because it is like 20 submodules (I think that is what they are
called), but if I must then I will. Hope this makes any sense. I know
what it is I am trying to do but explaining it is a different story.

Thanks,
Zero


--
zero635
------------------------------------------------------------------------
zero635's Profile:

http://www.excelforum.com/member.php...o&userid=24802
View this thread: http://www.excelforum.com/showthread...hreadid=480185



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with creating a loop Woodi2 Setting up and Configuration of Excel 1 April 19th 09 09:10 PM
creating a loop JakeShipley2008 Excel Discussion (Misc queries) 2 September 9th 08 02:17 PM
Creating a loop JakeShipley2008 Excel Discussion (Misc queries) 1 September 8th 08 10:26 PM
Creating a loop Ibuprofen Excel Programming 1 October 26th 05 04:41 AM
Creating a For Loop Justin Ragsdale Excel Programming 5 May 23rd 04 10:40 PM


All times are GMT +1. The time now is 12:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"