Results 1 to 7 of 7
  1. #1
    jamesfranklin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    33

    Excel VBA To Access VBA

    Hi,
    I'm having coding its working perfectly in excel. Now what's my problem is i need to change that coding into excel VBA to Access VBA
    I enter the coding here please go through this give me some solution

    Code:
    Sub test()
    Dim myRng As Range, cell As Range
    Dim Google1 As String, Google2 As String
    Google1 = "http://google.com/search?btnI=1&q="""
    Google2 = """&btnI=Google+Search"
    Set myRng = Range("A1", Range("A65536").End(xlUp))
    For Each cell In myRng
    ActiveSheet.Hyperlinks.Add Anchor:=cell.Offset(0, 1), _
    Address:=Google1 & cell.Value & Google2, _
    TextToDisplay:=cell.Value
    Next cell
    End Sub




    Thank u for spending time in this post..

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    What is purpose of this code? Are you editing hyperlink? Look at post 4 in https://www.accessforums.net/reports...ive-29804.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    jamesfranklin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    33
    Hi June7,
    Thank u for ur reply. Just u check the coding in excel. Enter data in Column A and Copy, Paste the Code. Same process i need in MSAccess
    Thank U for ur great time spending in this post

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Access is a relational database and nothing like Excel. Even tho tables might look like spreadsheets, they are nothing like a spreadsheet.

    The field in table is a Hyperlink data type?

    You can use manual copy/paste to create a new record or to copy value from field of one record to field of another record but to do this programmatically is not easy. Probably involves setting focus to field on form, running code to copy value to clipboard, move to another record and set focus on the desired field and paste from clipboard. Review http://access.mvps.org/access/api/api0049.htm

    Another method is to use SQL to UPDATE a field in specific record with a value selected from another record or use SQL INSERT to create entirely new record based on values in another record.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    jamesfranklin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    33
    Thank U June7
    Did u check this code r not?
    Did u understand my specification r not?
    I attached file here please check and give me some solution Please.

    Thank u...........
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I did read the code and your explanation did help understand it. I tried to give you some idea of what is involved in doing anything like the equivalent in Access. I can't provide specifics because I don't know your database and I am not going to build one for you. You have to acquire the necessary skills. That means knowledge of programming concepts, relational database principles, VBA language, and Access functionality.

    Did you review the reference? Here is another http://forums.aspfree.com/microsoft-...el-349267.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    jamesfranklin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    33
    Hi june7,
    Thank You For your reply. I got some idea



    regards
    Jamesss

Please reply to this thread with any new information or opinions.

Similar Threads

  1. excel link with access differs from simple export from access
    By M0RDANT in forum Import/Export Data
    Replies: 4
    Last Post: 03-25-2013, 02:43 PM
  2. Replies: 7
    Last Post: 05-09-2012, 06:06 AM
  3. import excel file to access 2003 yes, access 2007 no
    By stapik in forum Import/Export Data
    Replies: 9
    Last Post: 07-27-2011, 07:09 AM
  4. Replies: 1
    Last Post: 08-31-2009, 10:24 AM
  5. Excel to Access
    By iturnrocks in forum Access
    Replies: 0
    Last Post: 08-02-2006, 10:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums