4,901 Posted Topics
Re: 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 … | |
Re: 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 … | |
Re: 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] | |
Re: 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", … | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: "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 … | |
Re: Try this for your connection string for Excel "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=" & filename & ";" | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: Or you can download VirtualPC from Microsoft and create a Windows 98 virtual machine inside then for when you want to wax nostalgic. | |
Re: 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 … | |
Re: And you won't indent paragraphs with CRLF. You will indent with vbTab. | |
Re: 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 | |
Re: 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 … | |
Re: 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 … | |
Re: Acronis makes a great backup/restore utility that offers pretty good compression. Image files can be mounted to examine/extract files. | |
Re: Try putting single quotes around '@Password' in line 7. If _userid is also a string then do the same around '@ID' | |
Re: What is the value of connectionInfo? | |
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) … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 = … | |
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 … | |
Re: 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. | |
Re: 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 … | |
| |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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] | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: Based on what you've told us (which is nothing), neither do I. | |
Re: 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 … | |
Re: You can also use the syntax [code] Dim sqlQuery As String = "SELECT * FROM MyTable WHERE DateColumn BETWEEN @param1 AND @param2" [/code] | |
Re: 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 … | |
Re: 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 | |
Re: Go to control panel - > Windows updates -> view update history |
The End.