Search results for query: *

  1. G

    Referring to a datatable by string

    TableName is a string and sqlGaz is a string. So why won't this work? For each table in DS.Tables If table.TableName = sqlGaz(i, 0) Then 'do something here End If Next
  2. G

    DateTime Data Type

    Paul, If I remember correctly, a database stores date/times as a number of elapsed seconds from a given date (sorry, don't remember the exact date). Therefore, what you are seeing when you open the database is a human readable format not the actual value. If you want the database table to...
  3. G

    Conversion from string "" to type 'Double' is not valid

    I didn't have time to test it but it should be something along these lines: <CODE> Function SLMD() As Double Dim Life As Double = Convert.ToDouble(txtLife.Text) Dim Cost As Double = Convert.ToDouble(txtCost.Text) - 1 SLMD = Cost/Life End Function </CODE>
  4. G

    Programically added new form with button - Click even't doesn't see textbox

    Wouldn't you need to add "textbox1" to the control array before you referenced it?
  5. G

    Question New to all of this. Please HELP!!!

    Lukey83, If you are opening this using Microsoft Access then this is not a Visual Basic project. If it contains code, that code is in VBA (Visual Basic for Applications); a completely different animal from Visual Basic DotNet. You should post your questions on an Access forum. Just...
  6. G

    Creating a word doc from a template

    you'll need to set a reference to Microsoft Word and then use the Interop Services (Imports Microsoft.Office.Interop.Word).
  7. G

    Question Excel Interop - Using Worksheets Via Worksheet Codename?!

    Something like this maybe... For Each wSheet As Worksheet In xlsApp.Worksheets If wSheet.CodeName = something Then code here End If Next
  8. G

    Question Condition help.!!

    If textbox1.text.length > 0 Then ...code here Else ...code here End If
  9. G

    sendkeys

    With no information regarding the other application, I'm not sure anyone can say for sure. It sounds to me like the application is busy and is only catching the remaining piece of the file name when it returns. If you have no way to tell when it's ready to receive, you'll may need to resort to...
  10. G

    How to display a message ontop of programs

    He wants to display a form window over (on top of) a game window while continuing to play the game. I don't think that can be done can it? Doesn't topmost have focus?
  11. G

    Question SQL or Xml??

    If this is going to be a commercial application, you're really going to want to use SQL because of the security concern. Hotels have been sued over letting their booking information out to the wrong people.
  12. G

    value of type sales.cakes cannot be converted to integer

    Lets break this down. Your array is an integer array. Therefore, it is looking for an integer and is not going to accept anything else. Your class is an object, not an integer. You are trying to save an object to an integer array. It's not going to be accepted.
  13. G

    Is it possible to put this code TextBox1.Text in TextBox2 control ?

    Mangore, You REALLY should do it jmcilhinney's way. If you did, you would not have the issue you are having. Dim command as New SqlCommand("SELECT Name, Tel, Address FROM Table1 WHERE Tel = @tel") command.Parameters.AddWithValue("@tel", TextBox1.Text) That being said, the reason your Sql...
  14. G

    Question Ignoring 'Contains Link' Message

    Set "DisplayAlerts" to False when you open the workbook. Just remember to reset it back to True before you close it.
  15. G

    Trouble Accessing OCX Component

    JohnH, you're a life saver. Thank you!!:)
  16. G

    Trouble Accessing OCX Component

    I have a third party component that I regularly use. I referenced it as usual and it pulls in the dll's. However, it is not pulling the ocx into the toolbox. I last used this component four months ago and it's not showing in that project's toolbox either. I'm hoping there is a Studio...
  17. G

    How different is coding for MS Office 2007 vs MS Office 2003?

    My company will be upgrading from Microsoft Office 2003 to Microsoft Office 2007 in the near future and all our processes will need to be rebuilt. I expect to be asked for an estimated completion date but I have no idea how different the coding will be. We currently have automation built...
  18. G

    Resolved Print Word Document Range Issue

    Isn't that always the way: search for a full day, post the question, find the answer 5 mins. later. The PageFrom and PageTo parameters are listed in Help as "Objects". One would naturally assume that these would be numbers, as in page 'number'. But they are, in fact, strings. Here's the...
  19. G

    Resolved Print Word Document Range Issue

    Code: Public Function PrintDocument(ByVal pageFrom As Object, ByVal pageTo As Object, _ Optional ByVal displayErrorMessage As Boolean = True) As PrintReturns Try wrdApp.ActiveDocument.PrintOut(, , WdPrintOutRange.wdPrintFromTo, , pageFrom, pageTo...
  20. G

    Microsoft word Project

    Here's a quickie form with just four buttons. It's not perfect but it will suffice to give you the general idea. Option Strict On Imports Microsoft.Office.Interop.Word Public Class Form1 Private wrdApp As Microsoft.Office.Interop.Word.Application Private wrdDoc As...
Back
Top