Create And Working With Excels File On Vb?
Jan 30, 2011i want to create and working with excels file on vb
View 2 Repliesi want to create and working with excels file on vb
View 2 RepliesI want to create a program working in background that:I open program and he is invisible (not appear on desktop and in taskbar).How I can do this ?
View 6 RepliesI generated SQL Server 2008 Database scripts. There are total 80 objects. The script executes successfully from sql server query. But not from .NET. That is I want to create the objects (tables and stored procedures) from there.If the database don't exist already in sql server, it fails. I have included the line
IF NOT EXIST (DATABASE)...
CREATE DATABASE DBNAME
But it simply don't work and the process fails while the code perfectly works directly in SQL Server.
Any work around this? Can I run CREATE DATABASE somehow?
I am using VBNET2008 and SQL SERVER 2000.I tried to create this SQL string to retrieve CustomerID and a CustomerID and Name together but it's not working.Here are the SQL String that is not working.
Dim strsql As String = ""
strsql &= "Select CustomerID, "
strsql &= " ( CustomerID & " - " & CompanyName ) as [Companyname]"
strsql &= " From TestCustomers Order by CompanyName"
This is the error message"Conversion from string "Select CustomerID, CustomerID & " to type 'Double' is not valid.
Cause by this SQL String coding:
strsql &= " CustomerID & " - " & CompanyName as [Companyname]"
I am using the NORTHWIND DatacBase in SQL SERVER 2000 and the table is Customers
My Problem is, that I have some Buttons, Labels and TextBoxes I need to generate after the User told a number of Players. With the Code I'm using now only the last Player will have these Controls working, because they are moved - for example - from Player 1 to Player 3. how to create such a ControlArray The biggest Problem I have is, that these buttons have to have names like "1", "2", "3" and so on (or if it works somehow to read out the Index of a ControlArray the names will not be necessary).
This is the code I am using right now to generate the Controls, but as you see it won't work, because the properties will be changed when the For-Function restarts.What I need is a hint on how to get these Controls/Buttons into a Control-Array and then read out the Index-Number to use them in the Functions that are called.
Public Class Form1
Private btnTestNumButtons() As System.Windows.Forms.Button
Private Sub CreateButtonArray()[code]......
Working with Database, create report and print
View 5 RepliesPublic Sub bk()
Try
Dim strDatabasePath As String =
[code].....
Public Sub bk()
Try
Dim strDatabasePath As String =
[code]....
I tried to use bmp.save to create some thumbnail, it works fine for a while then stops working,how to troubleshoot the problem? the code doesn't generate any error:
Dim bmp As Bitmap = WebsiteThumbnailImageGenerator.GetWebSiteThumbnail(address, 800, 600, width, height) Dim ScreenshotPath As String = Request.PhysicalApplicationPath + "Screenshots" Dim ScreenshotName As String = UserAccountDB.GetUserFullNameByUserLogon(User.Identity.Name).Replace(" ", "_") + Now.ToString("yyyy'-'MM'-'dd'-'HH'-'mm'-'ss") + ".bmp" bmp.Save(ScreenshotName) imgWebsiteThumbnailImage.ImageUrl = "~/Screenshots/" + ScreenshotName
I do one project in visual basic 2010.In visual basic 6 project can be make Package and deployment (setup file or install file) file using Package and deployment wizard.But in visual basic 2010 express edition does not have Package and deployment wizard.how to make Package and deployment (setup file or install file) file in visual basic 2010 project?
View 4 RepliesI am trying to create a log file which I am going to use to populate some controls (DataGridView or Treeview). I am trying to figure out if should use text files or XML files to do so. Effectively the log will highlight multiple phases in a client-side app. The log will be written to at various phases when the project is running. The user will always have the options move on to the next phase or save progress and exit the project. As such, I want the log file to highlight how far the user has progressed throught the various phases AND I want the log to highlight varous information from each phase. Whenever the user starts the project, they will be given the option to load existing log files. So the project will have to read these log files and append them where necessary as the user progresses.
I am not sure what the best way to do this is and below is a rudimentary approach using text files. As you can see, the top of the file would have a summary of all the phases and whether or not the user completed each phase. Next each phase would have a data section highlighting what data was stored along the way. I have used a ":" to denote each section. Then within each section I would obviously need to use a delimeter for all my data. So if Phase1 = True, then I would load all the pertinent data from "Phase1:" into the desired control. Can anyone provide an efficient way of doing this and provide some insight as to whether I should use XML instead. The phases my change during development and I am not sure yet which controls I will be using. Does XML provide more flexibility.
In summary I am looking to create, read/write and append log files and populate controls with the data in varous sections of the log file. Example:
Phase1 = True
Phase2 = True
Phase3 = False
Phase4 = False
[code]....
i have aa bb cc i need aa bb cc
View 2 RepliesI just complete my assignment, everything work perfect on my computer. but when I copy this EXE to run on other computer I got an error
"XXX.exe has stopped working?? "
this project has no any dll file. I use only import System.Data.Oledb
I created a Windows Form in Visual Basic. I have the following code in my app. But its not working.
Try
Dim theUri As Uri = New Uri("http://myhostname.com/files/myfile.txt")
My.Computer.Network.UploadFile("F:TestFilesmyfile.txt", theUri, "myname", "mypassword",
[code].....
However I am trying to get my program into one little file. And I read how to Build Project and go to inRelease and get it from there. However it says this once I actually move it from its other files
Quote:
"*Program Name* has encountered a problem and needs to close. We are sorry for the inconvenience."
I get that as soon as I load it up. If there is any way at all to get it one simple file rather then like 3,4 files it would be so great.
I am trying to solve a mystery in VB 2010. I tried to look up in many places for the code or an example but every thing I have found was outdated. So, all I need is a code which will produce a file list of my ftp server/folder which will be transfered to ListBox object. Here is another thing. Everything I need in the ListBox is only a file name and its extention:[code]
View 10 RepliesTell & interduce a pdf the full explain about file programming in vb.net(such as create , open in binary and .... , explain file stracutre and all)? a full article (most of the ways about file in vb.net)?
View 4 RepliesI am trying to call a batch file from my program. It opens the file but the file doesn't work. This requires a little knowledge of java.
method one:
Code:
Dim odlg As New OpenFileDialog
odlg.InitialDirectory = path
odlg.Filter = ("Batch Files (*bat)|")
[code]....
Both of these make the batch file appear but somehow it isn't opened correctly or something. The two batch files are in the resources of my project. They get copied to a folder and that directory is named "path" which appears in the code above. Then I try to call the file from that folder with the directory being called "pathComp" which also appears in the code above. This batch file is meant to compile the java files created in a folder by the program by using the command "javac". Now when I run the program and get to this point and the batch window opens the cmd window says this:
Quote:
javac: invalid flag: *java
Usage: javac <options> <source files> use -help for a list of possible options
[code]....
It doesn't compile the files, however when I run the batch file independently of the program it works fine. I really need some help on this one. If you need it here is the code for the batch file that is called:
Code:
@echo off
title Java Compiler
:start
[code]....
I just saw in some wordpress plugins, there are auto tag plugin, auto RSS fetch, just you install the plugin and it keep working for ever without calling it.What i want to do is to put a dll file inside my Images folder and it will monitor the uploaded files and edit them based on some options, i want this dll to work automatically just when uploaded in the right folder, and keep running forever This can be done? If no, there is another options to do so? "i know that i can use a windows service or startup applciation, i mean other options" UPDATE: i want any other options, because the server may be shared so have no access on its windows to make a service or a start up.
View 3 Repliesfile.Exists function not working
Dim f1 As New FileInfo(Server.MapPath("/CaseStudyImages/TemporaryImages/"))
Dim f2 As New FileInfo(Server.MapPath("/CaseStudyImages/" & success & "/"))
[code]....
I'm using the following code to upload a file to web space that I own and and has all access rights, however for some reason even though it looks like it should work and there are no errors the file is never created on the server.
Dim wr As System.Net.HttpWebRequest
Dim ws As System.IO.Stream
Dim sw As System.IO.StreamWriter
[Code].....
I am reading the strings from the text file, but I would like to get the strings that come before the comma, then input the strings in the listbox.
[Code]...
How can I get the file NAME from the OpenFileDialog and make the Browse folder dialog to have the File NAME at the end of the folder destination?
1. I press "Browse for File"
2. I press "Browse for Folder"
3. After the directory for Browse for folder is shown, it will also include the file name taken from "Browse for file". I dont want it to replace the destination, but to add the File NAME to the folder destination.For example
"Browse for File" gives me the destination, C:Documents and SettingsOwnerDesktopFile.txt
"Browse for Folder" gives me C:Documents and SettingsOwnerDesktopNew Folder (3)
I want the File.txt text COPIED from "Browse for File" and PASTED on to the Destination of "Browse for Folder"
I have a php file that performs a certain function, and I would like to know how I make the program do that function, and write the results in a textbox.
View 3 RepliesI have installed on my computer Visual Studio 2010 Premium. I am working in a project, in VBasic.Net where I have to include some reports. Where can I find a good .pdf file training?
View 6 RepliesI want to make a search on my HDD to find a folder named "simon" and inside that folder I wanted to make a search of all .txt file. So this is my code
Dim d As String
Dim f As String
Try
[Code]....
This time I've to work with a file which inside is like this:url...I'd like to edit the highlighted part of text: "CustAssetSeen-803981731[NUL][STX][NUL][NUL][NUL]1"If the file was a normal text file I wouldn't have any problems, but I don't know how to work with this kind of file.
View 14 RepliesWe are attempting to run a batch file that will result in a submission to a help desk ticket system. When we run the batch file from command line on our W2003 platform, it works successfully. When we run the same file, called from our vb program, using shell or process info, it does not. With shell, we can see the batch file being called, but it is not resulting in update to the help desk ticket system. The vendor of the system believes it is a security issue. We are signed on as Administrator while running this. We set security permissions of cmd.exe to include Batch, per KB867466. What else should we be doing or looking at?
View 8 RepliesI have a FileUpload with a RegularExpressionValidator with the following Validation Expression
^(([a-zA-Z]:)|(\{2}w+)$?)(\(w[w].*))+(.gif|.jpg|.JPG|.JPEG|.GIF|.jpeg|.png|.bmp|.3dm|.3dmf|.ai|.drw|.dxf|.esp|.mng|.png|.ps|.psp|.svg|.tiff)$
This way i make sure the User only Upload Images.. But for some reason it does not work when i use Firefox.
I have a program that writes unhandled exception detail to a log file stored in the same directory as the program itself. I am wondering how I can have keep the file in the same location, and not have to worry about a file write access. With Vistas User Access Control enabled, the file is not accessible unless the program is run as an administrator, which I don't need it to be for anything else. The file does not exist all of the time, it only exists after an error occurs. Users are encouraged to email the file to me and then delete the file. Thus the file should only exist if their is a error that the user has not emailed. I really want to keep it in the same directory as the program itself, or within a subdirectory of the programs directory, since the portable version is exactly the same program executable and I would like to keep it that way. I am not sure how to go about setting the file security, set it when I create the file if the file doesn't exist, prompting for Administrator privileges to create it with the security. I was also thinking that I could just set the entire folder containing the program executable when it is installed, and then it would be able to create the file without having to have administrator privileges.
View 1 Replies