Posts by yjoshi

    Hi All,


    I struggled a bit to create a hyperlink for
    a range of numeric data, to go to a
    link and use the number as a parameter.


    I was able to do it, may be this will be
    useful to some people. :guitar:


    Lets say, we are creating an excel sheet with the note numbers on this site, select
    them and create a hyperlink to the respective notes on this website.


    Sub Links()
    'Hyperlink Macro
    'Creates a Hyperlink to the topic


    For Each cell In Selection
    cell.Select
    a = ActiveCell.Text
    If IsNumeric(a) Then
    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
    "http://www.ozgrid.com/forum/viewthread.php?tid=" + CStr(a)
    End If
    Next
    End Sub



    This code will do the job.
    You can now go to toolbar -> customize
    and create a macro button to attach to
    this macro.


    If you need to use this in multiple sheets,
    paste the code in PERSONAL.XLS


    Please let me know if this is helpful to
    somebody in their own work, and
    if there is any better way to do it.


    Cheers : Yogendra :cheers:

    Hi Roy,


    May be the problem text became a bit confusing.


    I want to get the data directly from
    the database using ODBC using VBA and not from the Master file.


    If we use master file, what you say,
    i.e. filter can be a good suggestion,
    but there is limitation on the size of
    master file, which i want to avoid
    by getting the data directly from database


    Any other solutions to have a VBA
    script to connect to database
    and fetch only restricted rows
    based on the excel file?
    :saint:

    It may not have worked exactly what
    the filer expected, but this is very helpful to some problem that I had.


    Thanx for this.


    There is one problem with this code.


    When i press enter after entering date
    in column D, the code searches for
    Active Cell, which is below the one which
    i just entered.
    E.G. If i have entered Date in D4 and
    pressed enter, the cell goes to D5.
    At this time the chageselection event is triggered and the active cell D5, if having
    date filled in, that row is copied.


    Is there any solution?


    Thanx in Advance
    :o2

    Hi Excel Gurus,


    I need to get only some records from
    database, which are in the column A
    of the sheet.


    Currently i am importing all the data
    using database query into one master
    file and then using vlookup to get
    values of those particular records.
    But as i need to do this very often, it is
    very time consuming and want to
    automate it using VBA script.


    The Database has, say columns
    PRIM,B,C,D&E.
    In excel sheet I give values for "PRIM"
    in column "A"


    How to fetch the respective records?


    Thanx in Advance



    :flower: