ScriptAddict, Thank you. Try to use the code in the link, but I was not expert enough. I am using VBA below. However, I am having problems using MSCOMM. Without the use of the MSCOMM. How can we send the command id01 at intervals of 10 seconds, receive data, distributed in cells? And so until automatically stopped. Excel Visual Basic CommandsCan anyone write me some code that does this? I can fine-tune it to the application needs. I've just never dealt with the serial port or a late-binded Excel object before and don't have time to make too many mistakes. I'd like to write a VB 6.0 executable which gets various ascii from a device in the serial port and plugs it into an excel spreadsheet, then prompts the user to name and save the spreadsheet. I need it to work with various versions of Excel. ![]() ![]() Excel Visual Basic ExampleThese examples are suitable for use in Visual Basic, Word, Excel and Access. The serial port ActiveX object can be inserted by VBA code (see the first example) or be manually inserted into form, worksheet or document. Hello everybody, I know nothing of macros for Excel. Need of a model that does the following: Connect to the serial port. Send a command. Receive the answer. Put received data at X address in. Right now, the data just goes to a printer, so the line-feed and returns, etc, are already in the datastream. Thanks, Kevster. Excel Visual Basic TutorialThanks for your help. Here's the code I'm using to make the text (which comes from a lab machine and is formatted for a printer) appear in the spreadsheet. This will work with any text, creating a two-d array broken by crlf and two spaces. ArRows = Split(strText, vbCrLf) For iRow = 0 To UBound(arRows) If iRow + 1 > cNumRows Then cNumRows = cNumRows + 100 ReDim Preserve aTemp(1 To cNumRows, 1 To cNumCols) End If arCols = ' arCols = Split(arRows(iRow), ' ') For iCol = 0 To UBound(arCols) If iCol + 1 > cNumCols Then cNumCols = cNumCols + 15 ReDim Preserve aTemp(1 To cNumRows, 1 To cNumCols) End If aTemp(iRow + 1, iCol + 1) = arCols(iCol) Next iCol Next iRow Kevin. Cookies are small text files stored on your local internet browser cache. A Web Beacon is an often-transparent graphic image, usually no larger than 1 pixel x 1 pixel that is placed on a Web site. Download neosat software and loader windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |