Foros del Web » Programación para mayores de 30 ;) » Programación General » Visual Basic clásico »

Mandar Imprimir desde vb6

Estas en el tema de Mandar Imprimir desde vb6 en el foro de Visual Basic clásico en Foros del Web. Hola, buenas tardes quisiera que me ayudaran en el sig codigo Dim xlApp As Excel.Application Dim xlWB As Excel.Workbook Dim xlWS As Excel.Worksheet Set xlApp ...
  #1 (permalink)  
Antiguo 28/07/2005, 18:10
 
Fecha de Ingreso: abril-2005
Mensajes: 65
Antigüedad: 19 años
Puntos: 0
Mandar Imprimir desde vb6

Hola, buenas tardes quisiera que me ayudaran en el sig codigo

Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Dim xlWS As Excel.Worksheet
Set xlApp = New Excel.Application
Set xlWB = xlApp.Workbooks.Open("C:\Documents and Settings\Japan Airlines\My Documents\Book1.xls")
Set xlWS = xlWB.Worksheets.Item(2)
xlWS.Visible = xlSheetVisible
xlWS.Range("B1:BC93").Select (AQUI ME MARCA ERROR)
xlWS.Range("B1:BC93").PrintPreview
xlApp.Quit
Set xlWS = Nothing
Set xlWB = Nothing
Set xlApp = Nothing
Picture6.Visible = True
Label16.Visible = True
h = MsgBox("Deseas capturar otro certificado ?", vbYesNo, "A T E N C I O N")
If h <> vbYes Then Exit Sub
Unload Form1
Form1.Refresh
Form1.Show

Y me da el error en el metodo select.

Alguna idea????

Gracias por todo
  #2 (permalink)  
Antiguo 29/07/2005, 11:36
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
De acuerdo

Cita:
Iniciado por gavafra
Hola, buenas tardes quisiera que me ayudaran en el sig codigo

Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Dim xlWS As Excel.Worksheet
Set xlApp = New Excel.Application
Set xlWB = xlApp.Workbooks.Open("C:\Documents and Settings\Japan Airlines\My Documents\Book1.xls")
Set xlWS = xlWB.Worksheets.Item(2)
xlWS.Visible = xlSheetVisible
xlWS.Range("B1:BC93").Select (AQUI ME MARCA ERROR)
xlWS.Range("B1:BC93").PrintPreview
xlApp.Quit
Set xlWS = Nothing
Set xlWB = Nothing
Set xlApp = Nothing
Picture6.Visible = True
Label16.Visible = True
h = MsgBox("Deseas capturar otro certificado ?", vbYesNo, "A T E N C I O N")
If h <> vbYes Then Exit Sub
Unload Form1
Form1.Refresh
Form1.Show

Y me da el error en el metodo select.

Alguna idea????

Gracias por todo
Prueba a colocar Item(1)....
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 17:17.