PDA

View Full Version : [SOLVED] Please Help me



puzzler1971
12-09-2016, 12:25 PM
I am try to take information from this spreadsheet (cyclecount 12-9-16)



Location
Part ID
Description




001
201364
alphabet soup


1002
211375
mixing bowl


1003
557964
8 inch carton



and put into a form that is in the same workbook. Then print and clear contents.
The form has fields below.

Location__________

Part ID___________

Description________



Here is what I have so far. (it covers row one). I need to to continue to next row and repeat step until last row.



Sub inventory()
'
' inventory Macro
'

'
Sheets("Sheet2").Select
Range("E5:L5").Select
ActiveCell.Formula = "='cycle count 12-9-16'!A2"
Range("E8:L8").Select
ActiveCell.Formula = "='cycle count 12-9-16'!B2"
Range("E10:L10").Select
ActiveCell.Formula = "='cycle count 12-9-16'!C2"
Range("E11").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Range("E10:L10").Select
Selection.ClearContents
Range("E8:L8").Select
Selection.ClearContents
Range("E5:L5").Select
Selection.ClearContents

End Sub





17798

SamT
12-09-2016, 12:50 PM
If you will show that code in A1 style, Not R1C1 style, I might be able to understand it.

Use menu > Tools >> Options >> General Tab >> Settings Frame then uncheck "R1C1 Reference Style."

puzzler1971
12-09-2016, 01:22 PM
17802

Okay here it is fixed.

JKwan
12-09-2016, 01:46 PM
give this a go

puzzler1971
12-09-2016, 01:52 PM
Thank You so much JKwan!!!! That worked.

JKwan
12-09-2016, 02:11 PM
you are welcome and merry xmas

SamT
12-09-2016, 02:15 PM
Thank you JKwan.

JKwan
12-09-2016, 02:37 PM
Sam, why thank me? You are not the op, but I will take it nonetheless :-). I am glad that I can help out. Merry Xmas to you and all the hard working mods and contributors!

puzzler1971
12-12-2016, 07:27 AM
another one that I can not get to work. I tried to use the same macro as above on another sheet. I changed the sheet names and cell numbers. However on this one I will sort it by Part ID on the cycle page. I need the Part ID to come over and the description. Then I need it to look for all locations for that part id and put it on the request form then print.

JKwan
12-12-2016, 10:54 AM
give this a kick and see

puzzler1971
12-12-2016, 11:03 AM
That worked. You are amazing. Thank you so much.