Visual Basic - DAR FORMATO A CELDAS DE EXCEL DESDE VISUAL BASIC

Life is soft - evento anual de software empresarial
 
Vista:

DAR FORMATO A CELDAS DE EXCEL DESDE VISUAL BASIC

Publicado por Rodrigo Vera (63 intervenciones) el 24/07/2003 21:35:59
HOLA AMIGOS, ESPERO QUE ALGUIEN ME PUEDA AYUDAR...

TENGO UNA APLICACION EN LA CUAL ENVIO DATOS A EXCEL, LO LOGRO HACER PERO NO SE COMO DARLE FORMATO DE BORDES A LAS CELDAS DONDE DEJO ESTOS DATOS.
SI ALGUIEN ME PUDIERA DAR UNA MANITO EN ESTO LE ESTARIA MUY AGRADECIDO.

DE ANTEMANO, MUCHAS GRACIAS
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:DAR FORMATO A CELDAS DE EXCEL DESDE VISUAL BASI

Publicado por Cecilia Colalongo (3116 intervenciones) el 24/07/2003 21:49:33
Puedes grabar una macro en Excel con todo lo que necesitas y luego copias el código en tu programa. Por ejemplo para poner en una celda el texto en negrita y colocarle bordes:

With objExcel
.Selection.Font.Bold = True
.Selection.Borders(xlDiagonalDown).LineStyle = xlNone
.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With .Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End With
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar