View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
open a adobe file from a command button open a adobe file from a command button is offline
external usenet poster
 
Posts: 15
Default Print To WorkSheet

The person that wrote this code is no longer around. It works great in the
immediate window. My question is what do I do to get it to print onto a
worksheet?

Thank You

Sub bill()
'Dim varibles
Dim xx As Integer
Dim Row As Integer
Dim Unit As Integer
Dim Shelf As Integer
Dim Position As Integer
Dim Rowcounter As Integer
Dim Unitcounter As Integer
Dim Shelfcounter As Integer
Dim Positioncounter As Integer

'Set varibles starting number
Row = 1
Unit = 1
Shelf = 1
Position = 0
Rowcounter = 1
Unitcounter = 1
Shelfcounter = 1
Positioncounter = 1
xx = 0

Do While xx <= 50
xx = xx + 1
Position = Position + 1

If Position = 6 Then
Shelf = Shelf + 1
Position = 1
End If



Debug.Print " Row is " & Row & _
" Unit is " & Unit & _
" Shelf is " & Shelf & _
" Position is " & Position

Loop
End Sub