4,911 Posted Topics

Member Avatar for lili22

You are being taught to program because it is important to be able to analyze and describe a process in detail, and at some point you will need to have an appreciation for the work that goes into developing an application. For a non-programming example, try to write out a …

Member Avatar for Reverend Jim
0
379
Member Avatar for jugnu

You could try psexec from the SysInternals (free) suite. You can download it from [URL="http://technet.microsoft.com/en-us/sysinternals/bb842062"]here.[/URL] This excellent suite was developed (mostly) by Mark Russinovich.

Member Avatar for Reverend Jim
0
460
Member Avatar for slbreaul

There are a few things you have to do before you even start writing code. [B][U]Determine the structure of your database[/U][/B] Determine what tables you need and what fields will appear in each table. One of the tables will be the libraries table and will contain at least two fields, …

Member Avatar for Reverend Jim
0
76
Member Avatar for toldav

If I might make a suggestion. Have you considered using a dictionary? It would simplify your code considerably. Here's an example: [code] Dim city As New Dictionary(Of String, String) city("AUS") = "Austin" city("BOS") = "Boston" city("BWI") = "Baltimore" city("DFW") = "Dallas" city("JFK") = "New York" city("LAX") = "Los Angeles" city("MIA") …

Member Avatar for toldav
0
206
Member Avatar for MB1711

You step through the tree and keep track of the current and previous nodes (I use variables named curr and prev). When you find a node with a value greater than the value of the node you want to insert then you can use the Insert method on the prev …

Member Avatar for Reverend Jim
0
4K
Member Avatar for vammy
Member Avatar for tallygal

There are a few things wrong here. The first thing is that your function return values do not agree in type with the values you are returning. Let's take [code] Function CommissionTotal() As String commTotal = (commpercentage * grossSales) / 100 Return commTotal End Function [/code] You declared the function …

Member Avatar for tallygal
0
246
Member Avatar for johmolan

First of all may I suggest that you use the built-in copy methods rather than rolling your own. My.Computer.FileSystem.CopyDirectory(srcefolder,destfolder) will do the copy of the entire folder just fine. That will save you some debugging. If you want to set a folder constant just do Const srceFolder = "D:\MyFolder" To …

Member Avatar for GeekByChoiCe
0
536
Member Avatar for djjavo

You could also define a click event for just one of the controls in the set then use AddHandler on form load to add the other controls to that handler. It would save a lot of clicking. You would have to modify the original handler to distinguish between the controls. …

Member Avatar for djjavo
0
2K
Member Avatar for khizer03

What kind of database? What is your level of expertise with databases/VB? Do you mean a process like [code] get username and password from text fields on a form compare to list of valid usernames and passwords from the database if username and password were found in the database let …

Member Avatar for Reverend Jim
0
293
Member Avatar for khizer03

Please stop posting threads with titles like "Urgent" or "Please Help". These titles are not descriptive. As another poster has pointed out more eloquently than I can, a crisis on your part does not constitute a crisis on mine. We are here to help but when I see a thread …

Member Avatar for khizer03
-1
242
Member Avatar for pROKO

I have two different versions of a command line script that I wrote. The first is written in python and the second in vbscript. The usage is the same for both (pick your poison). archive <folder> where <folder> is the name of the folder that you want to archive. For …

Member Avatar for pROKO
0
170
Member Avatar for renzlo

Assuming you have data in the given row (in the example, I use row 2 (first row is row zero), you can access all of the cells in that row by [code] For col As Integer = 0 To dgvTest.ColumnCount - 1 MsgBox(dgvTest.Rows(2).Cells(col).Value) Next [/code]

Member Avatar for Reverend Jim
0
157
Member Avatar for jdiaz1302

What about having one timer for motion and the other for doors. Each tick of the first timer would advance the elevator one unit in whatever direction it happens to be moving (unless the elevator is currently stationary). It would be a state-driven device with states suca as "stationary", "moving", …

Member Avatar for Reverend Jim
0
628
Member Avatar for flywheeljack

You have to change "As Date" in your function def to "As Integer" to correspond with the defined type of the variable "Day" or you will get an error.

Member Avatar for Reverend Jim
0
101
Member Avatar for kothaisaravan

You don't use SaveAs (or even Save) on a WorkSheet. You use it on a WorkBook. For example, the following code copies items from a listview into a new Excel WorkBook/WorkSheet then saves it to a file specified by the SaveFileDialog. [code] 'browse for a file to save the data …

Member Avatar for kothaisaravan
0
5K
Member Avatar for PF2G

Please put CODE tags around code to preserve formatting. After pasting the code, select all code and click on the CODE tool at the top of the edit winidow. We can't help without a few details such as what happens when you try to run this code. What errors do …

Member Avatar for bluehangook629
0
126
Member Avatar for jainjayesh1681

The following code shows how to create controls at run time. Create a new form and define one button at the top left with the name btnAdd. Paste in the code and give it a try. [code] Imports System.Windows.Forms Public Class Form1 Private xoffset As Integer 'x coordinate of new …

Member Avatar for Reverend Jim
0
172
Member Avatar for aishapot

It looks like "student info" is two words. You either have to enclode the table name in square brackets to indicate you are doing something weird or rename the table to something like student_info or studentInfo so that it is a single word. The second option (single word) is the …

Member Avatar for Reverend Jim
0
152
Member Avatar for djjavo

Try [code] Structure league Dim id As String Dim name As String Dim players() As String End Structure Dim leagues(100) As league for i as integer = 0 to 100 redim leagues(i).players(20) next [/code] I don't know why there should be a restriction on declaring the length of the players …

Member Avatar for djjavo
0
3K
Member Avatar for lunchmeat
Member Avatar for Netcode
0
106
Member Avatar for ananth3125

You haven't specified the problem. What document file? What merged file? You haven't said what it is you are trying to do. You have no comments or white space in your code, therefore your code is essentially unreadable. Please do a little more work and repost.

Member Avatar for Reverend Jim
0
159
Member Avatar for sigridish

Assuming you have an Excel file on D: named myfile.xls, you can access it as follows: [code] Dim xls As New Excel.Application Dim sheet As Excel.Worksheet xls.Workbooks.Open("D:\myfile.xls") sheet = xls.Workbooks(1).Worksheets(1) sheet.Cells(1,1) = "abc" sheet.Cells(1,2) = "def" sheet.Cells(1,3) = "ghi" xls.SaveWorkspace() xls.Quit [/code] That will set the first three columns of …

Member Avatar for sigridish
0
357
Member Avatar for XF15-Loader

"Associating" is a vague term that can mean many things. If you have an array of 52 images and an array of 52 strings (such as "AH 2H 3H..." then the two arrays are "associated" by their indices assuming that the two arrays were defined and loaded such that the …

Member Avatar for XF15-Loader
0
109
Member Avatar for Aviplo

Try this for your connection string for Excel "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=" & filename & ";"

Member Avatar for Reverend Jim
0
242
Member Avatar for netwebguru99

There have been several postings on this forum relating to accessing Excel spreadsheets from within VB. For example, I recently posted the following code which returns an array containg the names of all worksheets in a given workbook. [code] Private Function GetWorkSheetNames(ByVal ExcelFile As String) As String() Dim names As …

Member Avatar for netwebguru99
0
259
Member Avatar for ~s.o.s~

I'm curious as to how points are awarded when the OP marks a thread as solved. My control panel states "Forum threads marked solved after Reverend Jim replied to them". What happens in the case when I spend several hours helping a poster with a problem then someone else pops …

Member Avatar for Dani
2
358
Member Avatar for sigridish

You have to put some effort into the question 1. What is your program supposed to do 2. What is the actual (observed) result of running your code 3. What error message (if any) do you get 4. What is your database structure 5. What fields (data) are you trying …

Member Avatar for Reverend Jim
0
395
Member Avatar for georgeoshardo

Or you can download VirtualPC from Microsoft and create a Windows 98 virtual machine inside then for when you want to wax nostalgic.

Member Avatar for minuteman263
0
681
Member Avatar for kurohige

What is the error message that goes with that error number? Do you expect us to look it up just because you are too lazy to type in the eerror text? What line is generating the error? Are we supposed to guess that as well? How are we supposed to …

Member Avatar for Reverend Jim
-2
131
Member Avatar for MoldingHam

And you won't indent paragraphs with CRLF. You will indent with vbTab.

Member Avatar for codeorder
0
121
Member Avatar for renzlo

Please post the Input Files info here. When I try to follow your link my anti-virus software says Opening this website may put your security at risk

Member Avatar for Reverend Jim
0
256
Member Avatar for cguan_77

I presume you mean an Excel Workbook/Worksheet. As far as I know you have to open it first but you can do that easily with the following function [code] Private Function GetWorkSheetNames(ByVal ExcelFile As String) As String() Dim names As String = "" Dim xls As New Excel.Application xls.Workbooks.Open(ExcelFile) For …

Member Avatar for cguan_77
0
226
Member Avatar for bythebay

What happens when you go into the device manager (you can run it directly by entering devmgmt.msc in the run menu). Do you have any items with yellow flags? Does anything change when you do "Action -> Scan for Hardware Changes"? Are any of the new devices listed under any …

Member Avatar for bythebay
0
263
Member Avatar for ilyons

Acronis makes a great backup/restore utility that offers pretty good compression. Image files can be mounted to examine/extract files.

Member Avatar for Reverend Jim
0
151
Member Avatar for Mike Bishop

Try putting single quotes around '@Password' in line 7. If _userid is also a string then do the same around '@ID'

Member Avatar for Mike Bishop
0
204
Member Avatar for quentinqid
Member Avatar for Reverend Jim

I download a lot of articles for offline reading and archiving. When I download an article, it gets saved as AuthorFirstName AuthorLastName - title.ext Once I have read the article (assuming I want to keep it) I rename it to AuthorLastName, AuthorFirstName - title.ext I wrote a python script (swapnames.pyw) …

Member Avatar for Reverend Jim
0
141
Member Avatar for thetechlady21

When you post code, please surround it with code tags. The easiest way is to paste the code, make sure it is all selected, then click the CODE tool at the top of the edit box. The following code iterates over all rows in the datagrid and prints the values …

Member Avatar for Reverend Jim
0
194
Member Avatar for ogsim07

The easiest way would be to create a share on the server and create a shortcut to that share. You don't need an app for that. When the user runs the shortcut, a window opens to C:\temp on the server. Of course, this only works if you are on the …

Member Avatar for Reverend Jim
0
196
Member Avatar for AccurateAG

Copy the following code into a file name concat.vbs. To convert your text into a single line do something like concat myfile.txt > temp.txt temp.txt will have one line containing all of the lines in myfile.txt concatenated and separated by a space. If you want to use a different separator …

Member Avatar for timetraveller92
0
367
Member Avatar for compulove

Here is a chunk of "Save As" code from a menu in one of my apps [code] Private Sub mnuSaveAs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSaveAs.Click 'prompt for a file name and save the current library to that file dlgSave.Filter = "Book Library Files|*.bkl|All Files|*.*" dlgSave.DefaultExt = …

Member Avatar for Reverend Jim
0
86
Member Avatar for Reverend Jim

I have a NumericUpDown control that I want to allow the user to change with the mouse scroll wheel. The problem is that even with the following code [code] Private Sub numSeries_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles numSeries.MouseWheel If e.Delta > 0 Then numSeries.Value += 1 Else …

0
219
Member Avatar for ChrisTech

It may be line 82 in your code but we don't know what line in your POSTED code is throwing the error. Please identify the line where it dies.

Member Avatar for Reverend Jim
0
241
Member Avatar for stuidabest

One simplification I could suggest would be to replace the 26 button handlers (for the letters) with one handler for all of them. Below is the code for doing it for three letters. Just add to the end of the function header for more letters. [code] Imports System.Windows.Forms Public Class …

Member Avatar for Reverend Jim
0
93
Member Avatar for Start4me
Member Avatar for rajeshpodder007

If you go to Project -> (my app) Properties There is a checkbox labeled "Make single instance application" Select it if you want to allow only one instance at a time to run, deselect it if you want to be able to run multiple instances.

Member Avatar for Reverend Jim
0
166
Member Avatar for alexander1s

Start by writing out what you want to do step by step (this is called pseudo-code). You should do this before you write any code. Then try to step through your pseudo-code using pencil and paper (for a simple case such as 5 days) to see if your "code" does …

Member Avatar for Reverend Jim
0
167
Member Avatar for harinath_2007

It's the same "problem" as the other user who posted a similar "problem". The problem is that you do not understand how computers store and process floating point numbers. The square root function uses a floating point algorithm. The square root of 9 is not (according to the algorithm) exactly …

Member Avatar for Reverend Jim
0
230
Member Avatar for ananth3125

Are you saying you want to create a dropdownlist using the text from a textbox? If so, are you putting one line per list item or one word per list item? Please provide a little more detail.

Member Avatar for seagal1
0
103

The End.