Posts by smuzoen

    Here is an alternative to XMLHTTP using ServerXMLHTTP. XMLHTTP is designed for client applications built upon Microsoft Win32 Internet (WinInet). ServerXMLHTTP is designed for server applications (HTTP client stack, WinHTTP). As a general statement ServerXMLHTTP is quite robust and is server safe. ServerXMLHTTP is recommended for server applications and XMLHTTP is recommended for client applications and both have their advantages depending on the needs of the application.

    As in the commented code I would recommend to have some more specific error handling - if there is a problem then more direct error handling will help you narrow down the cause and will make the application more user friendly. If the specific error is of no concern to you simply use a catch all. I would always recommend error handling with this type of application. As you would appreciate a lot of unforeseen errors may occur when reading data over the internet. The second sub is simply to write the data scraped to a text file - modify the destination to your needs.
    If you are interested in the difference between XMLHTTP and ServerXMLHTTP then there is a good discussion here ->

    Re: Extract URLs from website, name of attachment, and save attachment to a folder $8

    I dont know if you are still looking for an answer however as previously stated the problem is (to quote your example) even though the link for your sample workbook has the narration Download Internet Files Automatically - User-Defined File Names - SAMPLE.xlsm the actual link is "attachment.php?attachmentid=68388&d=1456280246". As a result it is very difficult to parse the html in a dynamic website such as Ozgrid. In a static page you would have more luck as most likely the anchor links would refer to the true filename. In the case of (for example this Ozgrid page) you would have to use the HTML DOM and use node attributes to get the file name which is the inner text of the node. As John_w said to create a general solution would be extremely difficult as there is so many ways to write a webpage. If you had a set of web pages and by some fluke the html code is similar then you could write a solution - even regular expressions would be an option (albiet in my opinion not the best option).
    If you were to inspect the source for the pages your want to parse to get filenames and find they are similar then perhaps you could get a solution. Not sure how far you want to pursue it though. It is an interesting problem in that it is a challenge. I think the best way myself is to use the DOM, get all the nodes by tag (anchor) and hope the inner text contains the filename proper. It is easy to modify your sample workbook to do the latter - however whether this would work on the pages you are interested in cannot be know unless you allowed the developer to take a look at the source.
    One final option is to take the program John_w provided a link for and then parse the downloaded directories from your hard drive for the file extensions of interest and read it back into an Excel workbook......

    Re: Help for creating a VBA code to enter data into dump file from userform. US$30

    I can fix No 1.
    2. You never asked for 24 hour time - it was set up as 12 hour time - you should have asked for this in your specifications. I am not going to recode the workbook for that change as it was not part of your specifications
    For 3 if you enter the Concept and employee ID then you hit the Add/Edit button and the form will populate with data if there is an entry in the worksheet. Just select a Concept and add the Employee ID and hit Add/Edit and the workbook will populate. That is the functionality you listed under the Add/Edit button in your post above.

    Re: Help for creating a VBA code to enter data into dump file from userform. US$30

    I have finished your workbook. I will PM you my Paypal address. Once payment is received I will upload the workbook.
    Just a note - with the Add/Edit button - the worksheet you designed records the time difference not the actual times (Start/End times). To repopulate the form with the Start and End time requires another worksheet (quickest solution) - this essentially duplicates the data to be able to retrieve the Start and End Times as well. This would certainly be better as a database application or redesigning the Dump worksheet with hidden columns. However despite the duplication of data all the required functionality is implemented as you requested.
    NOTE: If you manually delete any data from the Dump sheet it will need to be deleted from the TimeSheet worksheet as well to synchronise the data retrieval. The password to protect the sheet is in the code - you will need this password to un-protect the sheets. I have highlighted the password in the code for you. If you are unable to find the worksheet password to unprotect it then let me know and I will PM it to you.

    Re: Help for creating a VBA code to enter data into dump file from userform. US$30

    All of that is fine - only one question:


    Add/Edit: On the same day if I want to edit details of particular employee I just will add Concept, Employee ID, remaining details (entered on the same day earlier) will appear into the userform so that I can edit them. After editing them hitting ADD/edit will update the details into the dump file.

    What if there are more than 1 entry for Concept, Employee ID on the same day or will there ONLY EVER be ONE entry for Concept + Employee ID on a single day?

    Re: Help for creating a VBA code to enter data into dump file from userform. US$30

    Just a few things - does EVERY field in the form have to be completed before the user can hit the Add button - that is they cannot leave any of the fields in the form blank?
    You just want the user to type in their Employee ID and Employee Name (no drop downs)?
    The quantities the user can enter - what are valid ranges/entries - can they enter decimals e.g. 3.5 or do they have to be whole numbers? Is zero (0) a valid entry for quantity?

    When the user hits the Add button do you want the form to close and the Dump worksheet to be visible or when they hit the Add button does the form reset and the user keeps entering information until they finally hit the Close button after which the Dump worksheet becomes visible?

    Re: Help for creating a VBA code to enter data into dump file from userform. US$15

    I am prepared to take on your development as per your PM and at the total cost of $30.
    PLEASE PAY (via PayPal) 10% of the total cost to [email protected] - i.e. pay $3.00 to Ozgrid via PayPal - the remaining $27.00 can be paid to me on completion of the project. I will PM you my PayPal email address when the code is completed. Please post into this thread (not via PM) confirmation that the 10% has been paid to Ozgrid. I will then post some questions I need to have clarified.

    Re: Code cycles through specific range of textboxes

    It ""ain't hackin' it" because I gave you a generic method to iterate through textbox controls - you need to extrapolate from the generic and apply some programming logic to come up with a specific solution. Perhaps this will stimulate some ideas on the required implementation

    Re: £30 Automate Spreadsheet

    Thank you for the spreadsheet and further clarification - I sent you some additional questions - if you could answer these for me as well please. Will have this finalised by the end of the weekend for you