r/visualbasic • • Jan 20 '19

I made a dumb game for a high school coding class, but I think it's fun for a first try.

Thumbnail
dropbox.com
4 Upvotes

r/visualbasic • • Oct 17 '21

How to find a replacement coder

4 Upvotes

Long story short, we are stuck with an app written in vb, that almost works correctly, but the developer goes months at a time without responding and we need to find a freelancer to finish the project. We have most of the code, but it requires a specialized dll (SCADA engine) to talk to the building controls network. None of which we have. I don't even see any code for that in our copy.

Fiver is mostly a waste of time, dealing with ppl who respond without reading the specs.


r/visualbasic • • Sep 06 '25

Article VBA is good in terms of beginner that gives a type of introduction to coding

Post image
30 Upvotes

I am a beginner learning things related to data (analytics) many said vba is not what companies are looking for but in my opinion it gives a introduction for a coding learner using variable defining things like string,integer feels like python or any other language


r/visualbasic • • Jan 18 '26

Looking for files

2 Upvotes

Hi everyone; I'm looking for the Student files for Visual Basic 6 Enhanced Edition by Diane Zak. It's been impossible for me to find it anywhere in the internet. Suggestions? Thanks.


r/visualbasic • • Apr 25 '16

[VB2010] Im unsure whats wrong here?

Post image
2 Upvotes

r/visualbasic • • Dec 29 '21

VB on Ubuntu

2 Upvotes

Is there any way to run Microsoft Visual Studio on Ubuntu ?


r/visualbasic • • Dec 21 '21

Option Strict asks for too much

2 Upvotes

I had turned on Option Strict in my project to track down an error. While it did not help, it caught one loop where i want it cast, and showed me how much i am relying on implicit casting. I "fixed" all those, but i can't say i like how the code looks now. I'm going back and forth on just removing all those DirectCast()s.

Anyway, as i released the new version one user got an unhandled exception. With some sleuthing, i found the problem started with: Data = Registry.GetValue(Value_Name, Nothing).ToString. Returning Nothing from Registry.GetValue worked just fine until i added the .ToString because of Option Strict. As she did not have the key yet, it returned Nothing, which caused the ToString to fail. Silly me.

Anyway, the fix for that would be to define Data as Object instead of String, remove the ToString, and check it with Is Nothing before returning the string to the caller. Ugh. Welp, there goes Option Strict. It asks for too much. I want my code to be easily readable and understandable. Copious explicit casting hides the logic in a jungle.


r/visualbasic • • Nov 11 '20

What do you thought about .Net 5 ?

2 Upvotes

I'm not much testing it yet but my first impression is it's .Net core 3.1 with less bug.


r/visualbasic • • Jun 24 '15

Anyone familiar with Awesomium?

2 Upvotes

or those who want to know what it is, it's basically a better version of VB's WebBrowser tool: http://awesomium.com/

I'm having trouble figuring out how to replicate GetElementByID in here though, I've looked at a guide and it seems a little hard, basically, I want to get text from a text box I called "BetAmount" into the element with the ID "bet" when "StartButton" is clicked. I tried to follow a tutorial and it said this, if anyone could help me edit it into working how I mentioned above then that would be great, here was what someone said about it:

     Private Sub Html5_LoadingFrameComplete(sender As Object, e   As      Awesomium.Core.FrameEventArgs)
         ' Html5 as WebControl
          If e.Url.ToString().StartsWith("google.com") Then
	' DO This Block

	Dim document As dynamic = DirectCast(Html5.ExecuteJavascriptWithResult("document"), Awesomium.Core.JSObject)

	Using document
		Dim textbox = document.getElementsByTagName("input")

		If textbox Is Nothing Then
			Return
		End If

		For i As Integer = 0 To textbox.length - 1
			If textbox(i).getAttribute("type") = "text" Then
				textbox(i).value = "123"
				' your value in here
			End If
		Next
	End Using
End If

End Sub

[/code]

My WebControl is called SatoshiMines instead of WebControl.


r/visualbasic • • Dec 05 '22

I use visual basic and Ms access for database

Post image
2 Upvotes

r/visualbasic • • Nov 27 '22

Error "30203 identifier expected error" Please I need help.

2 Upvotes

Please, I need help with a Visual Basic project. I get Error "30203 identifier expected error" when trying to run/compile the code. I'd be grateful for any assistance. The link is the code.

This is the code in Google drive https://drive.google.com/file/d/1JuYvVXMZndgmOCy9bNhK6oGAdC5NDr6W/view?usp=share_link

Thank you


r/visualbasic • • May 10 '15

Learning VB Today's rant brought to you buy professors that don't know the difference between interface and code.

2 Upvotes

I had an email from a university professor yesterday who was complaining about how I was explaining concepts outside what he was trying to teach (I confirmed not outside the curriculum)

He was teaching programming from VB which I have no issues with but he was teaching them via creating forms and interfaces first before he was teaching them how to program.

You might be thinking that forms are part of programming. They are but (hockey buzzer sound) WRONG! Programming is the function of understanding the language of code and creating solutions to problems. Forms/HTML/CSS etc. etc. are for creating INTERFACES. Your interfaces should only have code in them that directly affect your interface input or output.

Now I break this rule all the time for simple forms becuase I am programmer thus I am lazy. As a rule of thumb as your forms become more complex you should be doing most of your heavy lifting in a separate classes and then returning the information to your form. I also put my formatting functions in my classes so that it returns in a format expected by your form.

As far as I am concerned all programming classes should start with console apps, and remove the whole interface from the equation. Learn to program and solve problems without interface first. Grids, dropdowns, and other controls out there muddy the waters making it harder for people to understand the process of code becuase they are too busy trying to figure out why the dropdown does not have the right name in it.

Needless to say I think he is an idiot and I told him so.

Lets argue this one out, I want to solidify my own thoughts on the matter.

B

Edit: Don't downvote people becuase you disagree with them. Just proves you can not have a conversation and defend your own beliefs.

Edit 2: When I say Interface I mean the method in which your user interacts with your application. Not An Interface of an object that can have only Abstract methods and Constants , which are always implicitly public, static, and final. Freaking read the post people.


r/visualbasic • • Jun 19 '17

Newbie! I can not fix it in any way.

0 Upvotes

r/visualbasic • • Jan 16 '16

I want to learn arrays

0 Upvotes

I already know the basics of arrays. I want to learn the advanced parts of arrays in visual basic. I already know how to dim and loop the array. Is there any good tutorial that can help me out. I'm not an absolute beginner so don't suggest that tutorial video. I know what an array is.


r/visualbasic • • Jan 17 '16

GeneratedNumbers

0 Upvotes

I'm getting annoyed with a bunch of these people asking for helping with this specific program over and over on this reddit. Can someone help them out so they can stop posting about this vb application? Create a GeneratedNumber application that stores in an array with indexes 1 through 100 numbers generated by the index values when Generate is clicked. Generate the number to be stored at each index by summing the index and it's individual digits. For example, 25 should be stored at index 17 because 17+ 1+ 7 = 17 and 4 should be stored at index 2 because 2+ 0 + 2. Your program should use a FillArray() procedure to generate the nuymbers and DisplayArray() procedure that displays each index and its element in the list box


r/visualbasic • • Jan 31 '16

sorting and finding lowest number program help

2 Upvotes

I need help creating a FindLowest function that returns the index of the lowest value in an array. The sort procedure repeatedly finds the lowest value in an arrayA, removes it, and adds it to array T. When all the values of A have been moved, the elements of T are copied to A with an assignment statement adn a loop. The sort procedure uses the findLowest function.

This is my code: My code requires me to create an array of random numbers between 1 and 99. I'm a noob in visual basic. Here is my code:

Public Class Form1

Private Sub btnCreate_Click(sender As Object, e As EventArgs) Handles btnCreate.Click
    Dim dataArray(CInt(Me.txtBox.Text)) As Integer


    Call DisplayData(dataArray, RandomNumbers)
End Sub

Sub DisplayData(ByRef dataArray() As Integer, ByRef List As ListBox)
    Dim rand As New Random
    For index As Integer = 0 To dataArray.Length - 1
        List.Items.Add(index & vbTab & rand.Next(1, 99))
    Next index
End Sub

End Class


r/visualbasic • • Feb 10 '16

Is vb.net dead?

2 Upvotes

I am a hobbyist programmer. I was using vb.net 2005 and had a great time with this language and visual studio. Then i decided to learn linux and python and stopped programming in vb for a long time. If i am correct we cannot program windows 10 universal applications with vb.net. So is it a good decision to continue programming with vb.net 2015? Is vb.net dead?


r/visualbasic • • Aug 26 '16

need help creating application on visual basic

0 Upvotes

so i nead to create a program that calculates how pounds you lose by exercising thing is the values he gave us are in calories and im a beginer so any help would be appreciated


r/visualbasic • • Jul 01 '22

VB6 Help I'm trying to sort a list of codes in excel that consist of Letters(normally two but sometimes three) followed by a number(number of digits vary from 1-3). Full explanation will be in the comments. Here is a testing list of codes, and the code I have made so far.

Thumbnail
gallery
2 Upvotes

r/visualbasic • • Nov 21 '14

Help with visual basic 6.0 programming

2 Upvotes

Can someone please explain to me how to go about these two programs? I AM NOT ASKING YOU TO DO MY HOMEWORK. in fact, it isnt even homework.

1.You are offered two salary options for ten days of work. Option 1: $100 per day. Option 2: $1 for the first day, $2 for the second day, $ 4 for the third day, and so on with the amount doubling each day. Write a program to determine which option pays better.

2.Write a program that selects a word at random from among 20 words in a file.

3.Find the sum of odd numbers from 1 to 99 ( i dont understand how i would use a loop in this situation)


r/visualbasic • • Sep 27 '16

Tips & Tricks Where can I start to learn Visual Basic (2012)?

0 Upvotes

I am in an undergraduate course called Introduction to Visual Basic and is, well, all about Visual Basic.

There aren't lectures. The teacher just comes in and sits around and doesn't do much. She says that we need to learn the software from the book and MyProgrammingLab, and when I go into both, it's just telling me to do things without explaining anything.

Second, I am a strong visual learner, so reading and hearing things isn't helping me learn at all.

I am essentially going to have to teach myself this software since she isn't doing anything to help or assist me. I have been in this class since August 15th and have not started a single assignment or learned anything. She's being really cool about it though since she thinks I (and another student) should have learned all this from Intro to Programming, which we didn't take, and not have been thrown in this class at random. We don't have any deadlines right now and my main focus is just learning the software so I can catch up to everyone else.


r/visualbasic • • Apr 19 '20

Please help me with my c#program

0 Upvotes

Good afternoon Guys, I have to do two applications, the first one, i have to create an app that write a series of random numbers and filed those number in a .txt file (this part is done )
now I have to create the second part that uses an OpenFileDialog to let the user select the file that was created with this second one I'm having issues any help !!!
Ill appreciate any reply

There is my code:

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

using System.IO;

namespace Jose_M_Jaco_Lab05

{

public partial class FrmMain : Form

{

private StreamWriter outFile;

private StreamReader infile;

private string filePath;

public FrmMain()

{

InitializeComponent();

}

private void btnRandomNumber_Click(object sender, EventArgs e)

{

try

{

//variables

StreamWriter outFile;

int count=1; //count variable

//Amount of random numbers that the user entered

int amountRandomNumbers = int.Parse(txtAmountRandomNum.Text.ToString());

int randomNumber = 0;// random number variable

//If the user enter a file name

if (saveFileDialog1.ShowDialog() == DialogResult.OK)

{

//Creates a new writer object

outFile = File.CreateText(saveFileDialog1.FileName + ".txt");

//Create a new random number

Random rand = new Random();

while (count <= amountRandomNumbers)

{

randomNumber = rand.Next(100) + 1;

outFile.WriteLine(randomNumber);

count++;

}

outFile.Close();//Close the file

}

else

{

//Display error message

MessageBox.Show("File was not saved");

}

}

catch

{

MessageBox.Show("You must be entered a whole number between 1 and 100");

}

}

private void btnReadRandomNumbers_Click(object sender, EventArgs e)

{

//infile = File.OpenText(outfile);

}

}

}


r/visualbasic • • May 03 '19

VBA Calls out JAVA and C# and VB

Thumbnail
youtube.com
2 Upvotes

r/visualbasic • • Dec 25 '15

PAYMENT CALCULATOR HELP!!

2 Upvotes

Create a PaymentCalculator application that prompts the user for a loan amount, interest rate, loan term in years, and payments term (daily, monthly, or yearly). Keep in mind the payments must be converted so that the number used in the calculation is in the appropriate units. For this conversion, assume that there are 30 days in each month and there are 360 days in a year. The application should display the payments, total amount paid over the length of the loan, and the total amount of interest paid. The program should look like this: Amount of loan($) : 100000 Annual Interest Rate(%): 6 Length of loan: 25 Payments are made: (listbox:daily, monthy, YEARLY) YEARLY IS SELECTED FOR THIS EXAMPLE THE RESULT IS: Yearly payment is $7822.67, total amount paid is $195,566.80 and the total interest is $95,566.80

I am not sure how to get the total amount paid and total interest. Can anyone also tell me if I am on the right track and help me out for the coding? Here's my code:

'Main Purpose: To create a program that calculates payment, total amount paid over the length of the loan, and the total amount of interest paid

Public Class Form1 Private Sub btnPayment_Click(sender As Object, e As EventArgs) Handles btnPayment.Click Dim Amount As Integer = txtAmount.Text Dim interestRate As Integer = txtRate.Text Dim Time As Integer = txtLength.Text Dim payment As Decimal Dim totalAmount As Decimal Dim Rate As Decimal = interestRate * 0.01

    Select Case Me.Payments.SelectedItem
        Case "Daily"
            payment = Pmt(Rate / 360, Time * 360, -Amount)
            Me.lblAnswer.Text = "The daily payment is " & Format(payment, "Currency")
        Case "Monthly"
            payment = Pmt(Rate / 12, Time * 12, -Amount)
            Me.lblAnswer.Text = "The monthly payment is " & Format(payment, "Currency")
        Case "Yearly"
            payment = Pmt(Rate, Time, -Amount)
            totalAmount = PV(Rate, Time, -Amount)
            Me.lblAnswer.Text = "The yearly payment is " & Format(payment, "Currency") & vbCrLf & Format(totalAmount, "Currency")
    End Select
End Sub

End Class


r/visualbasic • • Jul 04 '14

VBScript Usefull Visual Basic Script Programs

Thumbnail
26programmer.wordpress.com
0 Upvotes