PRINTER.PRINT DUVIDAS

JOAO.PERSONAL 03/01/2005 16:53:28
#58328
. Fala galera primeiramente feliz ano a todos e todas, bom o meu probleminha é o seguinte estou querendo alinhar valores a direita mas estou com problemas por ex:

Printer.Print "Saldo Anterior R$ "; Tab(40); Format$(Format$(txtsaldoanterior.Text, "###,###,##0.00"), "@@@@@@@@")


O que posso esta fazendo de errado neste código ele sai centralizado, desde já obrigado...
CAJU 03/01/2005 17:04:46
#58335
mcurrenty = printer.currenty
Printer.Print "Saldo Anterior R$ "
printer.currenty = mcurrenty
printer.currentx = printer.scalewidth - printer.textwidht (Format$(Format$(txtsaldoanterior.Text, "###,###,##0.00"), "@@@@@@@@") )
printer.print Format$(Format$(txtsaldoanterior.Text, "###,###,##0.00"), "@@@@@@@@")


blz?
JOAO.PERSONAL 03/01/2005 17:29:19
#58343
Caju blz é isso ai só tem mais uma coisinha se tiver mais valores na mesma linha por ex:

Printer.Print lstlista.SelectedItem; Tab(20); ValorEmpresa; Tab(40); Format$(Format$(lstlista.SelectedItem.SubItems(2), "###,###,##0.00"), "@@@@@@@@"); Tab(60); Format$(Format$(lstlista.SelectedItem.SubItems(3), "###,###,##0.00"), "@@@@@@@@"); Tab(80); Format$(Format$(lstlista.SelectedItem.SubItems(4), "###,###,##0.00"), "@@@@@@@@"); Tab(100); Format$(Format$(lstlista.SelectedItem.SubItems(5), "###,###,##0.00"), "@@@@@@@@")

como seria a linha de código?
[S50]
USUARIO.EXCLUIDOS 03/01/2005 18:15:21
#58351
Resposta escolhida
tente

Private Sub Command1_Click()
ImprimeAlinhadoDireita "Teste1"
ImprimeAlinhadoDireita "Teste2"
ImprimeAlinhadoDireita "Teste3" & "Teste 4", 1000
End Sub
Sub ImprimeAlinhadoDireita(Texto As String, Optional PosicaoY)
If Not IsMissing(PosicaoY) Then
Printer.CurrentY = PosicaoY
End If
Printer.CurrentX = Printer.ScaleWidth - Printer.TextWidth(Texto)
Printer.Print Texto
End Sub
JOAO.PERSONAL 03/01/2005 18:30:44
#58354
Valeu Guru....
Tópico encerrado , respostas não são mais permitidas