sdja4 escribió:!!!!!!NO ME HACEIS CASO!!!!!
QUE ME CONTEIS QUE TAL ESTA EL LIVE!!!!!!!!!!!!!!!!!
JODERRRRRRRRRRRR
Ya te contesto yo.
El juego en realiad en el live esta Err_Handler:
MsgBox Err.Description, vbCritical, "Error: " & Err.Number
End Sub
Private Sub DisplayQuarterlySales(oWS As Excel.Worksheet)
Dim oResizeRange As Excel.Range
Dim oChart As Excel.Chart
Dim iNumQtrs As Integer
Dim sMsg As String
Dim iRet As Integer
' Determine how many quarters to display data for.
For iNumQtrs = 4 To 2 Step -1
sMsg = "Enter sales data for" & Str(iNumQtrs) & " quarter(s)?"
iRet = MsgBox(sMsg, vbYesNo Or vbQuestion _
Or vbMsgBoxSetForeground, "Quarterly Sales")
If iRet = vbYes Then Exit For
Next iNumQtrs
sMsg = "Displaying data for" & Str(iNumQtrs) & " quarter(s)."
MsgBox sMsg, vbMsgBoxSetForeground, "Quarterly Sales"
' Starting at E1, fill headers for the number of columns selected.
Set oResizeRange = oWS.Range("E1", "E1").Resize(ColumnSize:=iNumQtrs)
oResizeRange.Formula = "=""Q"" & COLUMN()-4 & CHAR(10) & ""Sales"""
' Change the Orientation and WrapText properties for the headers.
oResizeRange.Orientation = 38
oResizeRange.WrapText = True
' Fill the interior color of the headers.
oResizeRange.Interior.ColorIndex = 36
' Fill the columns with a formula and apply a number format.
Set oResizeRange = oWS.Range("E2", "E6").Resize(ColumnSize:=iNumQtrs)
oResizeRange.Formula = "=RAND()*100"
oResizeRange.NumberFormat = "$0.00"
' Apply borders to the Sales data and headers.
Set oResizeRange = oWS.Range("E1", "E6").Resize(ColumnSize:=iNumQtrs)
oResizeRange.Borders.Weight = xlThin
' Add a Totals formula for the sales data and apply a border.
Set oResizeRange = oWS.Range("E8", "E8").Resize(ColumnSize:=iNumQtrs)
oResizeRange.Formula = "=SUM(E2:E6)"
With oResizeRange.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.Weight = xlThick
End With