Notifications
Clear all

CAIXA DE TEXTO - IMPRESSÃO

17 Posts
3 Usuários
0 Reactions
2,696 Visualizações
(@denilsonsl)
Posts: 0
New Member
Topic starter
 

Fala galera.

Estou com um problema.

preciso de um código, preciso usar uma caixa de texto ou checkbox, que quando selecionado ao apertar um botão seja feito uma impressão de uma planilha referenciado.

explicando melhor, tenho um planilha que tem vários relatórios, mas tenho uma planilha principal, la contem 10 caixas de texto para cada relatorio, quando clicar em um botão, será impresso somente o relatorio selecionado pela caixa de texto....

Alguem pode me ajudar nisso.

 
Postado : 12/12/2015 4:04 pm
(@denilsonsl)
Posts: 0
New Member
Topic starter
 

Mauro.

Achei uma solução que deu certo, veja abaixo.

Como não acabei especificando exatamente o que precisa, com seu post e solução passada, deu certo co codigo.

Fico grato pela ajuda.

Sub impressao_Clique()

Application.ScreenUpdating = False

Dim NCopia1 As Integer 'varivel para referencia de impressão
Dim NCopia2 As Integer 'varivel para referencia de impressão
Dim NCopia3 As Integer 'varivel para referencia de impressão
Dim NCopia4 As Integer 'varivel para referencia de impressão
Dim NCopia5 As Integer 'varivel para referencia de impressão
'Dim NCopia6 As Integer

Plan1.Activate

NCopia1 = Cells(2, "P").Value
NCopia2 = Cells(2, "R").Value
NCopia3 = Cells(2, "S").Value
NCopia4 = Cells(2, "Q").Value
NCopia5 = Cells(2, "T").Value
'NCopia6 = Worksheets("Plan1").CheckBox1.Text
'NCopia6 = Plan1.CheckBox1.Value

Plan2.Select
ActiveWindow.SelectedSheets.PrintOut Copies:=NCopia1, Collate:=True, IgnorePrintAreas:=False
Plan3.Select
ActiveWindow.SelectedSheets.PrintOut Copies:=NCopia2, Collate:=True, IgnorePrintAreas:=False
Plan5.Select
ActiveWindow.SelectedSheets.PrintOut Copies:=NCopia3, Collate:=True, IgnorePrintAreas:=False
Plan6.Select
ActiveWindow.SelectedSheets.PrintOut Copies:=NCopia4, Collate:=True, IgnorePrintAreas:=False
Plan8.Select
ActiveWindow.SelectedSheets.PrintOut Copies:=NCopia5, Collate:=True, IgnorePrintAreas:=False

Plan1.Activate

If Plan1.Olimpia.Value = True Then
Plan1.PrintOut
End If

If Plan1.Thunder.Value = True Then
Plan1.PrintOut
End If

If Plan1.Flex.Value = True Then
Plan1.PrintOut
End If

If Plan1.Tuber1.Value = True Then
Plan1.PrintOut
End If

If Plan1.Tuber2.Value = True Then
Plan1.PrintOut
End If

If Plan1.Tuber3.Value = True Then
Plan1.PrintOut
End If

If Plan1.Coladeira1.Value = True Then
Plan1.PrintOut
End If

If Plan1.Coladeira2.Value = True Then
Plan1.PrintOut
End If

If Plan1.Coladeira3.Value = True Then
Plan1.PrintOut
End If

Plan1.Activate

Range("P2").Select

Application.ScreenUpdating = True

End Sub

 
Postado : 16/12/2015 11:57 am
(@fernandofernandes)
Posts: 43750
Illustrious Member
 

Para mim está difícil entender o que deseja.
Imprimir uma mesma planilha um determinado numero de vezes?
e/ou
imprimir varias planilhas diferentes uma unica vez?
e/ou
imprimir varias planilhas diferentes um determinado numero de vezes ?
e/ou .....

 
Postado : 17/12/2015 8:53 am
Página 2 / 2