Answer Questions
nabeelfarid Word border problem (declaration
I want to set: WordApp.Selection.Borders = wdBorderBottom But problem is, that it says that wdBorderBottom is not declared. How can I declare it Try this: Word.WdBorderType.wdBorderBottom where are you obtaining the code from Of course if you get an error stating that the variable is not declared, then you need to declare it of course in order for it to work but I am guessing (unsure) that you are using COM Interop to access Word instance If so, you need to give it the correct parameters/properties/values etc... would help if you can supply where you are obtaining the code from so we can help ...Show All
fgalarraga Retrieving decimal symbol
Hi, I'm looking for a way to access the regional option of Windows to retrieved what character is used as the decimal symbol. I'm building a little calculator application that have to work with the English or French setting. So I need to know the decimal symbol to be use "." or "," or the programme crash when converting string to number. Thanks you The following should help you Dim x As System.Globalization.NumberFormatInfo = My .Computer.Info.InstalledUICulture.NumberFormat Dim s As String = x.NumberDecimalSeparator The following class has numerous useful localization information for the machine My.Computer.Info.InstalledUICulture ...Show All
AlpanaDhole Save text file with "ENTER" and "TAB"
Hello, I am using the following codes to save data from a datagrid to a text file. I am a beginer in programming, so it may not be the best way of doing it. Dim DataRow As Integer = 0 Dim DataSaveString As String = "" While DataRow <= 27 DataSaveString = DataSaveString + Me .DataCache.Item(0, DataRow).Value + ChrW(10) DataSaveString = DataSaveString + Me .DataCache.Item(1, DataRow).Value + ChrW(10) + ChrW(13) DataRow = DataRow + 1 End While Me .TempSaveField.Text = DataSaveString Dim TextEncoding As Encoding = Encoding.ASCII File.WriteAllText( "TestFile.txt" , Me .TempSaveField.Text, TextEncoding) End Sub I manage to save the information but ...Show All
Cordell Swannack Generating a Unique String
I have a source text file in the following format (irrelevant fields removed) CODE,DESC,COLOR,SIZE 1234,FRED,BLACK,8 1234,FRED,BLACK,10 1234,FRED,BLACK/WHITE,8 1234,FRED,BLACK/WHITE,10 1234,FRED,BLACK/BLACK,8 1234,FRED,BLACK/BLACK,10 1234,FRED,BLACK/BROWN,8 1234,FRED,BLACK/BROWN,10 1234,FRED,BLACK/BLUE,8 1234,FRED,BLACK/BLUE,10 I need to create a unique 3 character code, for each of the BLACK, BLACK/WHITE, BLACK/BROWN, BLACK/BLUE etc So my result would look something like this CODE,DESC,SHORTCOLOR,COLOR,SIZE 1234,FRED,BLK,BLACK,8 1234,FRED,BLK,BLACK,10 1234,FRED,B/W,BLACK/WHITE,8 1234,FRED,B/W,BLACK/WHITE,10 1234,FRED,B/B,BLACK/BLACK,8 1234,FRED,B/B,BLACK/BLACK,10 1234,FRED,BBW,BLACK/BROWN,8 1234,FRED,BBW,BLACK/BROWN,10 1234,FR ...Show All
JonnyAJAX reset password while logged in as another domain
hi , currently where i'm working there is a need for some users to use multiple Windows domains... For example CONTOSO and NWTRADERS (ok we don't use these domains, but for example's sake) The users log in under NWTRADERS and use Run As... to run programs that still needs to use CONTOSO credentials... Network drives are also mapped with CONTOSO credentials while logged in as NWTRADERs... I would like to create a utility that would le tthe user know when their CONTOSO password is going to expire, and allow them to reset their contoso password, but requiring them to enter their original password first... Basically invoke whatever windows does when you press Ctrl+alt+del then click Change Password... , except for a domain o ...Show All
Pushkar Tiwari How to automate Microsoft Excel from Visual Basic Expess Edition?
I have tryed to automate Microsoft Excel from Visual Basic Expess Edition with the help of http://support.microsoft.com/kb/219151/en-us but in this example the code is written for Visual Basic .net or 5 or 6 not for expess edition.I copy the code exactly as this link shows and i put the reference Microsoft.Office.Interop.Excel. After running and pressing the button i get the following: COMException was unhandled Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD)) Can anyone help I have excel 2002.I downloaded office xp pia which is recommented if you do not want to use office core.Then I referenced the microsoft.office.interop.excel to the progec ...Show All
vitich Problems extending DataGridView
I have created an extended version of DataGridView and all is well except when I try to set the default number of rows and columns. At first I implemented it in the New constructor but was getting twice the number of columns I wanted (but the right number of rows). I tried to set AutoGenerateColumns to false but that had no affect (it was a long shot anyway). Instead I moved the function to the OnHandleCreated sub which almost works. Now I get an error caused by the following designer generated code: Me .grdScheduleMatrix.Columns.AddRange( New System.Windows.Forms.DataGridViewColumn() { Me .DataGridViewColumn10, Me .DataGridViewColumn11, Me .DataGridViewColumn12}) When I run it the following error is generated: "Warning&n ...Show All
NorCis MS VB2005 Getting Started Training Videos
Is there anyway to download the training videos and save to disc to be viewed later on Media Player Currently I download and have to view them on WIN Media player over the internet after they speed a lot of time BUFFERING. Try right-clicking the link and instead of Open, choose Save... Dear Sir, I do not know about video.But You can read my thread VISUAL BASIC 2005 SIMPLE GUIDE. ok Bye. Mur it Hakan C L Thank you 'nobugs' your suggestion was right on. ...Show All
Bill_W Hello nooby here... needs a quick answer!
Ello... I am in the middle of programming a game... ... again.. in visual basic... and I can't seem to find a way to make it check to see if a image is a certain image... Basically... what i want it to do... ... is when you click it... have it check to see which picture is up... Example (Red is the part I'm stuck on and can't seem to get to work I've tried so many different things its insane... but I'm sure one of you experts has the answer I'm looking for) : If Picturebox1.Enabled = true And Picturebox1.picture = ("C:\Picture.jpg") Then Picturebox1.Image = Nothing Picturebox1.load = (C:\Picture2.jpg") End If ANY help what so ever would be appreciated... Thank you all, Moveit man.... so close!!!... now i hav ...Show All
Steffanp updating data grid connect to ms access database.
I have a ms access database with a table consisting of the fields user_id and password. i have a datagrid binded with this information that is displayed in a vbform. i have added an "add" button. when i press this i want the new data entered in the datagrid to be updated in the msaccess database as well as the datagrid. so far i have the following code: Dim connStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source = C:\Documents and Settings\Owner\My Documents\Telephone.mdb" Dim con As New OleDb.OleDbConnection(connStr) con.Open() Dim objcommand2 As SqlCommand = New SqlCommand objcommand2.CommandText = "INSERT INTO Users" & _ "(User_ID, ...Show All
A1Programmer Write a value to HTML input=file
Hi I have been writing a program to automate some common web sessions i do for my work. Ie logon, download info etc. i can get this all to work except on one form where i want to upload files from my computer, the element is Input = file. I cannot programically write a value to it. I have tried: writing to its outerHTML atribute changeing its type to text and many other variations I am pulling my hair out here, every thing else in my program works automatically but i have to wait for this section then manully upload the file. Any ideas Ossie Bucko, According to your problem, I suggest you to use the FileUpload class that is added new in .NET Framework 2.0. This class displays a text box control and a brows ...Show All
amer sohail Shared interface member
Why can't interface methods be declared Shared in VB I have a controllerFactory interface that is used in a number of apps to dispense app sepcific controller classes for use in an app neutral framework. Currently I have to create an instance of the controller factory classes to invoke the GetController methods. Ideally I'd like to make this method shared and invoke it without creating an instance of the Factory. If I try to mark the implementation shared then Visual Studio shows the error "methods or events that implement interface members cannot be shared". If I mark the interface method as shared the error message is "'Shared' is not valid on an interface method declaration". Here's the interface definition: ...Show All
Corby111 Application Icons
Hello there, How do you actually make icons which will appear in the top-left hand corner ...The default one for me has become boring EDIT: I've got a problem again...When I created my Icon file through Visual Studio and saved it. I set my projects icon to be the icon I made but It comes up with some other Icon which was the default icon in the icon file before I deleted it. AliQ When you say " It comes up with some other Icon... ", do you mean the icon at the Up-left cover on your form if so, you have to open the winForm designer and change the form icon property to your icon Right, and just to be crystal clear -- there are two types of icons associated with your application. One is for the ...Show All
soh99 Problem unloading AppDomain
Hi, I'm writing a small app that will retrieve the assembly version number of all assemblies in a particular folder. To do this I'm loading each assembly into its own app domain, getting the info I need and then unloading the app domain. But this still leaves the assemblies locked - they are only unlocked when I exit the application. How can I get around this To be able to load each assembly in its own app domain my own application has to be running from the same location as the assembly. Is there any way around this The code I use is below: <code> Private Sub ListProjects( ByVal root As String ) Dim baseDirectory As New DirectoryInfo(root) Dim assemblies As FileInfo() = baseDirectory.GetFiles( "*.dll&q ...Show All
Dan Mikkelsen Saving into Excel
I know i can save text files into text documents, but can i save them into excel spreadsheets Hi, See these articles.>> Check if EXCEL is on the system.>> http://www.devx.com/vb2themax/Tip/19507 type=kbArticle How to open a spreadsheet.>> http://www.c-sharpcorner.com/UploadFile/mgold/HowtoOepnandReadanExcelSpreadsheetinaListViewin.NET11282005034134AM/HowtoOepnandReadanExcelSpreadsheetinaListViewin.NET.aspx How to do some cell editing etc, not just for the EXPRESS edition .>> http://www.codeguru.com/vb/gen/vb_general/ideincludingvisualstudionet/article.php/c12061__1 Hope that helps. ...Show All
