Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27389

VS 2012 VBA to VB.net syntax conversion

$
0
0
First let me say that I am slowly progressing with my knowledge of visual basic. I know a little more about visual basic for application then vb.net. I would like to to know how to convert this snippet of code written in VBA to have it work in VB.net. I also have more VBA code needed to be "translated" into vb.net but will ask at a later time. Here's what I'm trying to accomplish in steps. Thanks in advance for your guidance.

What I'm trying to do:
I have a userform that has label that displays the current time; a button to the right of the label named "Change Time"; and a maskedtextbox overlapping the label set for military/European time which is set to invisible.

Step:
1. Convert this working VBA code and have it work in VB.net
2. Once the user clicks on "Change Time" button it makes the label invisible and the maskedtextbox to visible.
3. Also, if possible, if the user enters the hour greater than 23 or minute greater than 59 then display a message on exit (using 00:00 as midnight)

Code in VBA
Code:

'Sets Current System Time
    lblCurrentTimeInput = Format(Time, "hh:mm")


Viewing all articles
Browse latest Browse all 27389

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>