No announcement yet.

Unconfigured Ad Widget


Listing of Files and Worksheets

  • Filter
  • Time
  • Show
Clear All
new posts



  • cayusbonus
    From week numbers to standard date format
    Hi all, I am quite new in VBA, but after two weeks I have learnt a lot thanks to this forum, so I feel kind of in debt with it. I have been recently looking for an example where VBA converts from week dates to the regular mm/dd/yyyy date format, but I couldn't find a satisfactory answer. Yes, we have the weeknum function to be used in a spreadsheet but so far I couldn't call it in my VBA code. So therefore, I generated the code below that applies the ISO 8601 standard to make such a conversion. Hope it helps to somebody.

    Sub WeeksToDates()
    'Converting YYWW.DD to MM/DD/YYYY dates according ISO 8601. More info
    Dim Todayf As String        'Date in yywk.dd format
    Dim Yearf As Integer        'Year of the input date
    1 day ago
  • Reafidy
    Textbox Class Object
    Hi All,

    I recently had a request for a better method of controlling multiple textboxes on a userform. "I have lots of textboxes on a userform I want the user to only be able to enter numbers in all of them!"

    The solution: Making use of a class module. The method below will alow you to handle the event for all textboxs at once without having to add events for each individual textbox on the form.

    Add a class module and name it "clsObjHandler"

    Option Explicit
    Private WithEvents tbxCustom1 As MSForms.TextBox    'Custom Textbox
    Public Property Set Control(tbxNew As MSForms.TextBox)
        Set tbxCustom1 = tbxNew
    End Property
    Private Sub tbxCustom1_Change()
    'Message Box To Display
    December 11th, 2007, 05:32
  • Furybringerx
    Parsing HTML Table to Excel
    My personal project this past week has been trying to parse a HTML table to Excel.
    I've used many resources to finally get the code I'm looking for. It has taken a week to figure it out so I feel that I should share it to help others like me.

    Sub ParseTable()
    Dim IE As InternetExplorer
    Dim htmldoc As MSHTML.IHTMLDocument 'Document object
    Dim eleColtr As MSHTML.IHTMLElementCollection 'Element collection for tr tags
    Dim eleColtd As MSHTML.IHTMLElementCollection 'Element collection for td tags
    Dim eleRow As MSHTML.IHTMLElement 'Row elements
    Dim eleCol As MSHTML.IHTMLElement 'Column elements
    Dim ieURL As String 'URL
    'Open InternetExplorer
    Set IE = CreateObject("InternetExplorer.Application")
    December 11th, 2013, 05:39