Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fecha en un combobox

publicado

Como verán soy muy principiante en el tema

Tengo un formulario, y en el combobox1 tengo que poner una fecha, cuando me carga en la hoja, me pone cualquiera,

Alguien me puede dar una manito

copio el codigo

Private Sub CommandButton3_Click()


For i = 4 To 3000
If Hoja1.Cells(i + 1, 1).Value = "" Then
Hoja1.Cells(i + 1, 1) = Val(TextBox1)
Hoja1.Cells(i + 1, 2) = Val(ComboBox1)
Hoja1.Cells(i + 1, 3).Value = ComboBox2

TextBox1 = Empty

TextBox1.SetFocus
Exit For
End If
Next

End Sub

 

 

Gracias de antemano

Featured Replies

publicado

Por lo que entiendo, debes convertir el dato a fecha tal como haces con la función Val() (Que por cierto no recomiendo si usas decimales a menos menos que solo sea entero pero igual no lo recomiendo).

Si vas a registrar fecha en las celdas desde el control ComboBox, según el numero de iteraciones de tu bucle, le dices algo así:

Hoja1.Cells(i + 1, 3).Value = CDate(ComboBox2) 'Si es que tienes la fecha en el control

o

Hoja1.Cells(i + 1, 3).Value = CDate(Date) 'Si es que es la fecha del sistema

 

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.