4,901 Posted Topics

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
626
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
354
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
258
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
680
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
262
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
149
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
200
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
366
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
229
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
Member Avatar for flywheeljack

You could also put all of the radio buttons inside a container like a GroupBox and access them all by [code] Imports System.Windows.Forms . . . For Each ctrl as Control In GroupBox1.Controls Debug.WriteLine(ctrl.Name) Next [/code]

Member Avatar for Reverend Jim
0
139
Member Avatar for dew97

Can you please avoid convenient (for you) abbreviations? I assume f.k and p.k are foreign and primary keys. Also, some context would be nice. If you want help please do us the courtesy of providing as much information as you can. For example 1) how about some code for us …

Member Avatar for Reverend Jim
0
124
Member Avatar for tallygal

The easiest way to read in a text file is to do it all at once as in [code] Dim alltext As String = My.Computer.FileSystem.ReadAllText(filename) alltext = alltext.Replace(vbLf, "") Dim lines() As String = alltext.Split(vbCr) [/code] Or you can do it all at once by [code] Dim lines() As String …

Member Avatar for tallygal
0
232
Member Avatar for Resentful

So you want someone to do all the work yet you can't even take the time to describe what the program does? Not cool.

Member Avatar for Reverend Jim
0
168
Member Avatar for Redskyhelp
Member Avatar for Redskyhelp
0
85
Member Avatar for mihirpatel12

If you want to display text in a textbox you say [code] txtMyTextBox.Text = mystring [/code] If mystring contains vbCrLf (carriage return/linefeed) then multiple lines will be displayed (as long as you have enabled that in the properties for the textbox). If you want a more specific answer then ask …

Member Avatar for Reverend Jim
0
86
Member Avatar for abc_123abc

You can also use the syntax [code] Dim sqlQuery As String = "SELECT * FROM MyTable WHERE DateColumn BETWEEN @param1 AND @param2" [/code]

Member Avatar for gd740
0
4K
Member Avatar for Ritesh_4

You can't get something for nothing. If your virtual machine is honking back cpu cycles doing video conversion then there are fewer cycles left for other processes. If you limit the resources available to the virtual machine either by putting a ceiling on available memory or by lowering the priority …

Member Avatar for Ritesh_4
0
153
Member Avatar for Alok1019

You could always boot off a linux live cd and copy the files to another folder or some other media. Have you tried running a CMD session as Administrator and rerunning cacls to /e /g everyone:f

Member Avatar for adam_k
0
105
Member Avatar for tungnk1993

The End.