inputbox syntax location

C

Curt

Have code pulled from group seems my location is wrong or something get error
on
pCnt=inputbox yellows this line prior to inserting this worked ok note 2nd
ActiveWindow checked out after insert input
Correction Thanks


With Sheets("Check_In")
pCnt = InputBox("How Many Copies")
ActiveWindow.SelectedSheets.PrintOut Copies:=pCnt, Collate:=True
' ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
.pagesetup.PrintArea = "A2:D" & Cells(Rows.Count, "B").End(xlUp).Row
ActiveSheet.pagesetup
.PrintGridlines = True
 
D

Dirk Nachbar

pcnt is a string, put val() around it

ActiveWindow.SelectedSheets.PrintOut Copies:=val(pCnt), Collate:=True

Dirk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

first go around inputbox 5
problem column (B) 2
? Object What object 1
Collection verses array 4
shrink to fit expand 0
combind print copy amount 1
landscape printing 0
macro print area 11

Top