Private Sub Form_Load()
Me.Move 0, 0, 11580, 7620
Call CenterForm(Me)
lvalida = True
VSP_Doc.MaxRows = 25
Call VSP_Doc.DeleteRows(1, VSP_Doc.MaxRows): VSP_Doc.MaxRows = 25
Call VSP_DetPend.DeleteRows(1, VSP_DetPend.MaxRows): VSP_DetPend.MaxRows = 15
DTPFecha.Value = Date
DTPFecha.Enabled = False
CmdAyudaGD.Enabled = True
CmdAnulaDocto.Enabled = False
Call ProtegeVS_grilla(VSP_Doc) <---- acá me marca el error VSP_Doc as variant --->
cmbBodega.Clear
cmbBodega.AddItem "Punto Venta:" & Trim(Nombre_Local) & Space(100) & "^" & Trim(cCodPtoVta_Local)
cmbBodega.ListIndex = 0
Set rs = ExecSp("BP", "UnidadMedida_Bodega_Lista", GetDSN(1), True)
VSP_DetPend.MaxCols = nColGD_UMIni
nColUmed = nColGD_UMIni - 1
ntoanchoUm = 0
Do While Not rs.EOF
nColUmed = nColUmed + 1
VSP_DetPend.MaxCols = nColUmed
Call VSP_DetPend.SetText(nColUmed, -1000, rs!Nom_Umed)
VSP_DetPend.ColWidth(nColUmed) = 4.38: ntoanchoUm = ntoanchoUm + 4.38
rs.MoveNext
Loop
VSP_DetPend.MaxCols = nColUmed + 7
difAncDes = 4.38 * 7 - ntoanchoUm
VSP_DetPend.ColWidth(nColNV_Des) = 16 + difAncDes
nColNV_Tot = nColUmed + 1: Call VSP_DetPend.SetText(nColNV_Tot, -1000, "Total")
VSP_DetPend.ColWidth(nColNV_Tot) = 4.5
nColNV_Uni = nColUmed + 2: Call VSP_DetPend.SetText(nColNV_Uni, -1000, "Prec.Unit")
VSP_DetPend.ColWidth(nColNV_Uni) = 6
nColNV_STo = nColUmed + 3: Call VSP_DetPend.SetText(nColNV_STo, -1000, "Sub-Total")
VSP_DetPend.ColWidth(nColNV_STo) = 8
VSP_DetPend.BlockMode = True
VSP_DetPend.Row = -1: VSP_DetPend.Row2 = -1: VSP_DetPend.Col = nColGD_UMIni: VSP_DetPend.Col2 = nColUmed + 3
VSP_DetPend.CellType = SS_CELL_TYPE_NUMBER
VSP_DetPend.TypeTextOrient = SS_CELL_TEXTORIENT_HORIZONTAL
VSP_DetPend.TypeEllipses = False
VSP_DetPend.TypeHAlign = SS_CELL_H_ALIGN_RIGHT
VSP_DetPend.TypeVAlign = SS_CELL_V_ALIGN_TOP
VSP_DetPend.TypeNumberMin = "0.00"
VSP_DetPend.TypeNumberMax = "100000000.00"
VSP_DetPend.TypeNumberShowSep = True
VSP_DetPend.TypeNegRed = False
VSP_DetPend.TypeSpin = False
VSP_DetPend.TypeSpinWrap = False
VSP_DetPend.TypeSpinInc = "1.10"
VSP_DetPend.TypeNumberDecPlaces = 0
VSP_DetPend.TypeNumberLeadingZero = SS_LEADZERO_INTERNATIONAL
VSP_DetPend.TypeNumberNegStyle = SS_NUMBER_NEGSTYLE_INTL
VSP_DetPend.TypeNumberDecimal = ","
VSP_DetPend.TypeNumberSeparator = "."
VSP_DetPend.BlockMode = False
nColNV_Fam = nColUmed + 4: Call VSP_DetPend.SetText(nColNV_Fam, -1000, "nColGD_Fam")
VSP_DetPend.Col = nColNV_Fam: VSP_DetPend.ColHidden = True
nColNV_FilaNV = nColUmed + 5: Call VSP_DetPend.SetText(nColNV_Fam, -1000, "nColGD_Fam")
VSP_DetPend.Col = nColNV_FilaNV: VSP_DetPend.ColHidden = True
nColNV_NV = nColUmed + 6: Call VSP_DetPend.SetText(nColNV_Fam, -1000, "nColGD_Fam")
VSP_DetPend.Col = nColNV_NV: VSP_DetPend.ColHidden = True
nColNV_IteFila = nColUmed + 7: Call VSP_DetPend.SetText(nColNV_Fam, -1000, "nColGD_Fam")
VSP_DetPend.Col = nColNV_IteFila: VSP_DetPend.ColHidden = True
Call cmbBodega_Click
End Sub