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 Mike Lewis 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. CADD6953

    Help needed with syntax/logic in Attachmate macro

    Skip, you saint! I got it working and tested it out with about 60+ initial inputs that scraped over 900 lines of data into excel - couldn't find any issues. I did have to make quite a few amendments to the code though. At the start of each new input search, it's running a loop of PF7 10 times...
  2. CADD6953

    Help needed with syntax/logic in Attachmate macro

    I've attached a word document with a high level walk through/key strokes on each screen (redacted due to sensitive information and page 5 is not included as it was too much to redact and is really only needed for screen scraping). I've set the variables and inserted a loop for the PF8 keys...
  3. CADD6953

    Help needed with syntax/logic in Attachmate macro

    Alrighty, I've been making some edits to both macros (I went ahead and just updated it within the last post since these are fairly long macros and a bit bothersome to repost with minor changes). I realized the PG1-PG5 values I had being referenced from my excel cells of the first screen scrape...
  4. CADD6953

    Help needed with syntax/logic in Attachmate macro

    It’s running perfectly for one input. I just recently tested it with multiple inputs (i.e. the PO values) and realized I’m missing some syntax to execute after the initial value so I’ll need to review it a bit more in break mode to see exactly where the disconnect(s) occur but should be...
  5. CADD6953

    Help needed with syntax/logic in Attachmate macro

    Alrighty Skip :) I've got it working now but had to break it apart into 2 macros - the first one to screen scrape the records pages and acquire some reference values and the second to go into the more detailed pages based off the reference values (I don't think there should ever be more than 5...
  6. CADD6953

    Help needed with syntax/logic in Attachmate macro

    Alrighty, it looks like the value is being scraped and stored into excel in the cell that PG is referencing however the comment of PG = PR is showing that the value for PG is 0000 so there is a problem. PR is storing the correct value. If I tried to run the macro a second time, while that...
  7. CADD6953

    Help needed with syntax/logic in Attachmate macro

    Okay, made some changes which seemed to have fixed the macro recognizing and using the reference value correctly so that is no longer the issue. The PG value is null starting off in excel until stored with the PR value from Attachmate. This value will be overwritten when the macro goes through...
  8. CADD6953

    Help needed with syntax/logic in Attachmate macro

    Also, based on your advice I tried without the screen scraping to see how it functions and only saw how the page navigation & other commands executed. It seems to be working great and recognizing the reference values then navigating to the correct screen based off that. However, when following...
  9. CADD6953

    Help needed with syntax/logic in Attachmate macro

    Okay, so I tried adding in reference values PR/PG. I'm not sure if this would be the correct/best way to have a reference as it doesn't seem like the macro is seeing that the values match and is thus resorting to the Else '5 command sequence. I can see it's storing the correct value from...
  10. CADD6953

    Help needed with syntax/logic in Attachmate macro

    I agree that the alternative is the proper route if this is to be functional, I'm just not too skilled or versed in coding to know how to best write that. The values in the records/rows I'm looking for change between pages so I would assume I'd want to use a value there for the macro to...
  11. CADD6953

    Help needed with syntax/logic in Attachmate macro

    Unfortunately the PA1 key takes you back to a screen to select a session, the PA2 key would be to move to the next session and the PA3 key seems to have no effect on the screen. PF3 is the only one I see notated as a return function but that starts you back off at the first page/entries of...
  12. CADD6953

    Help needed with syntax/logic in Attachmate macro

    Heya Skip! PF8 is like the next or next page function while PF3 is like the back function. The manual process of it is that you would enter an input (designated by PO in this case) then hit enter to see a list of all records for that value; if there are more records that that screen can show...
  13. CADD6953

    Help needed with syntax/logic in Attachmate macro

    Hello Again! After a few years since my last post I've been able to adapt the original macro that was created with great help from the community and make it perform numerous functions. Now, I'm looking to essentially have an extension of that original macro in excel screen scrape some...
  14. CADD6953

    Macro for Excel to Attachmate and Back Again

    Hey Skip, I just changed up the order in which the code was executed and it seems to be working perfectly now. Here is what I ended up with: Sub DataExtract() Dim Sessions, System As Object, Sess0 As Object, PO As String, WB As WorkBook, WS As Worksheet Set System = CreateObject("EXTRA.System")...
  15. CADD6953

    Macro for Excel to Attachmate and Back Again

    Yes, I believe I figured it out. By removing the 2, 6 from Sess0.Screen.PutString PO, 2, 6 it has pasted it into Attachmate but only loops for the first value from "Groups". It looks like it pasted the next value but did not register it when it moved to the next screen.
  16. CADD6953

    Macro for Excel to Attachmate and Back Again

    When I DEBUG/Break I'm getting the correct values for PO w/ the expression and X but no transfer into Attachmate. With Worksheets("Workbook") Do For X = rw To ActiveSheet.Rows.Count PO = Format(Sheets("Groups").Cells(X, 1).Value, "000000") If PO = "" Then Exit Sub...
  17. CADD6953

    Macro for Excel to Attachmate and Back Again

    It seems it's still not pulling the data into Attachmate though. X is now showing Empty, PO now shows "" for the value, and Sheets("Groups").Cells(X,1).Value has <Application-defined or object-defined error>. Trim() was removed from the last expression as I was receiving an object required error.
  18. CADD6953

    Macro for Excel to Attachmate and Back Again

    PO is a 6 byte alphanumeric value already preformatted with the padding of 0's (via an earlier macro) in front of any values. For example, if the cell originally shows 12 then it is formatted to be 000012 as the value being entered into Attachmate needs this format. Alphanumeric values would...
  19. CADD6953

    Macro for Excel to Attachmate and Back Again

    I realized that object was the wrong variable type to have PO set for as there are some alphanumeric values within the column. I've changed PO to a variant variable and set the range for A1:A10000 from "Groups" sheet. Now I'm having an error of type mismatch at...
  20. CADD6953

    Macro for Excel to Attachmate and Back Again

    Microsoft Excel VBA

Part and Inventory Search

Back
Top