ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   inputbox syntax location (https://www.excelbanter.com/excel-programming/393818-inputbox-syntax-location.html)

Curt

inputbox syntax location
 
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

Dirk Nachbar

inputbox syntax location
 
pcnt is a string, put val() around it

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

Dirk


Curt

inputbox syntax location
 
put in the () still same problem

"Dirk Nachbar" wrote:

pcnt is a string, put val() around it

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

Dirk



Curt

inputbox syntax location
 
My dim statement was wrong
Thanks

"Dirk Nachbar" wrote:

pcnt is a string, put val() around it

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

Dirk




All times are GMT +1. The time now is 01:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com