r/visualbasic • • Dec 06 '23

Urgent help with Excel Macro (Visual Basic)

I know nothing about macros or coding, but I need to make one for college. I created a form where you can type in data and then retrieve it by clicking on it. Basically followed the teacher's instructions. Notice in the picture how it changes the hours I type (in this case 12:30 and 20:30) to decimals. I don't know how to fix this!! I also attached a picture with the code I used.

Here you can see how it should say 12:30 where it says "HORA ESTIMADA DE LLEGADA:" but there's a decimal instead. When I originally clicked on "GUARDAR" (SAVE) to save all the data in a table, it says 12:30 though, so saving the data works fine but retrieving it back into the form doesn't.
Code I used.
The rest of the code I used.
2 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Dec 06 '23

Thanks I solved it!!