Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Rick_Stanich

    Save xls file to cvs file

    Workbook instead of name.... Got it! Worked fine with your code. Solved. Thank you. Rick Stanich CMM Programming and Consulting, LLC
  2. Rick_Stanich

    Save xls file to cvs file

    Excel xls file. Rick Stanich CMM Programming and Consulting, LLChttps://files.engineering.com/getfile.aspx?folder=0a0b15e8-4548-42f3-bc20-4660faa66f1e&file=57094-97_B_Op_2_of_2_03-04-24_3.xls
  3. Rick_Stanich

    Save xls file to cvs file

    I am trying to write VBScript to save an active Excel file as a CVS file, The format of the Excel file needs to be retained. See example Excel file (57094-97_B_Op 2 of 2_03-04-24_3.xls) and example CVS file (57094-97_B_Op 2 of 2_03-04-24_3.cvs) for comparing. The Excel file is from a CMM...
  4. Rick_Stanich

    VB.NET 2022 Read from Excel

    Actually, I forgot to add the link. Rick Stanich CMM Programming and Consulting, LLC
  5. Rick_Stanich

    VB.NET 2022 Read from Excel

    Although the title of the post is misleading as I switched from DataGridView to simply reading an Excel file, there is a lot of information in the post about Excel files. (Special thanks to Andrzejek) thread1867-1828231: How to get data from DataGridView to a Listbox? Rick Stanich CMM...
  6. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    Do we have a message system on this forum? I'd like to send you a small gift card, just to say thank you. Rick Stanich CMM Programming and Consulting, LLC
  7. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    I did get the code going and I not only got what I hoped, but it seems so much simplified now. Thank you again! Rick Stanich CMM Programming and Consulting
  8. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    This appears to have solved the error. Do While .cells(intR, 1).value <> Nothing Rick Stanich CMM Programming and Consulting
  9. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    I am getting an error at: Do While .cells(intR, 1).value <> "" Format error, it displayed "" (nothing displayed). I changed the double quotes with "-1", this now shows the first part number but again an error. I am using VS 2022. Is it too much to ask to see your project so I can open it...
  10. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    That was my initial goal, but I was led to using DataGridView instead. In VBA, its easy. Rick Stanich CMM Programming and Consulting
  11. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    I did not know this; I am working with legacy Excel files. I do know this has been done before, I have an EXE file that is doing what I am attempting to do, I just need to update things for new versions of OS and the CMM software. Unfortunately, the source code is unknown. I will create a new...
  12. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    Using method 1 of your two solutions. "Select * From [Sheet1$] where [Part] is null or [Part] = '" & ComboBox1.Text & "' order by [Part]") I get odd results. See images Capture1.PNG and Capture2.PNG Its adding a lot of "=" signs. Also attaching my Excel workbook. (DataGridView is not retrieving...
  13. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    Thank you, I am looking into these methods. Rick Stanich CMM Programming and Consulting
  14. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    What I am getting is: (Values from the first row). Part - 00-294528 BoreSystem - 5x75 KidneySystem - 3x50 DatumATip - 3 Number of Bores - 9 What I need is what you posted: (Values from the 2nd row, those are my variables for a CMM language called PCM). Part - 00-294528 bore_system - 5x75...
  15. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    I'm going to move forward; I appreciate all the Help/Code you have provided. I'll worry about looking for help later if I can't resolve this on my own. Rick Stanich CMM Programming and Consulting
  16. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    I think there is another method: Dim datDT As System.Data.DataTable = ExcelOleDb("V:\CMM Data Files\Micura CMM PCM Programs (252)\Inline Blocks\Parameters.xls", "Select * From [Dimensions$A:BZ] where [Part] = '" & ComboBox1.Text & "'") By adding something similar to this?: "select *...
  17. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    WOW. Something I did not understand or know, it seems that the first row (header row?) is automatically included in the population? (If I expressed that right). Removing the Header Row Property by adding: HDR=YES to the following. .ConnectionString &= "Extended Properties = ""Excel 12.0...
  18. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    That is correct. Rick Stanich CMM Programming and Consulting
  19. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    In Excel, I can get a Row (to used range) and place that in a Listbox/Combobox as a Column using "Transpose". See image of the excel worksheet: Excel file Data in a row.PNG At runtime of my VB project, I select the first entry (Part), 00-294528 in my Combobox, as you helped, it places that...
  20. Rick_Stanich

    How to get data from DataGridView to a Listbox?

    The code works as you stated, I am now reading on how to get the entire row from "Part" in the Listbox transposed to a column. I've been reading for a couple days now, and I found the Code Bank page. Rick Stanich CMM Programming and Consulting

Part and Inventory Search

Back
Top