+ Reply to Thread
Results 1 to 3 of 3

including workbookname in RefEdit value doenst work with Range :-(

  1. #1
    Registered User
    Join Date
    08-18-2015
    Location
    Utrecht, Netherlands
    MS-Off Ver
    2010
    Posts
    69

    including workbookname in RefEdit value doenst work with Range :-(

    Hi,

    Since the RefEdit control doesn't include the workbook name in de range reference, i've made a bit of code that does this. when trying to paste de range in antother sheet, it doesn't seem to work :-(.

    My code is as follow:

    Dim TableRange As Range
    Dim TableAdress As String
    Dim MyControl As Control

    RelevantSheet = "UPLOAD_Organization"

    TableAdress = "[" & SETTINGS.Cells(3, 12) & "]" & RefEditOrganization.Value
    Set TableRange = Range(TableAdress)
    TableRange.Copy Destination:=Worksheet(RelevantSheet).Range("A1:A1")

    the "[" & SETTINGS.Cells(3, 12) & "]" part contains the workbook name. When combined, it looks like there's nothing wrong, but i can't get it to work :-(

    Any help?

    Tnx!

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: including workbookname in RefEdit value doenst work with Range :-(

    Is this the entire code being used??? Where is the Paste portion of the code?
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    08-18-2015
    Location
    Utrecht, Netherlands
    MS-Off Ver
    2010
    Posts
    69

    Re: including workbookname in RefEdit value doenst work with Range :-(

    Hi,

    This is the entire code. Is first had this (that worked :-))

    Dim TableRange As Range
    Dim TableAdress As String
    Dim MyControl As Control

    RelevantSheet = "UPLOAD_Organization"

    TableAdress = RefEditOrganization.Value
    Set TableRange = Range(TableAdress)
    TableRange.Copy Destination:=Worksheets(RelevantSheet).Range("A1:A1")

    But now when I want the workbookname in the TableAdress, it doesn't work..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Vlookup on userform whit range of Refedit control
    By luidd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-20-2013, 05:36 PM
  2. Refedit to fetch range from Other excel sheets
    By sbhas2k in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-13-2011, 04:13 AM
  3. Why would a Range including over 524 rows not work?
    By jebediah in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-05-2007, 02:24 PM
  4. RefEdit returns range address - not range value!!!
    By pmguerra in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-04-2007, 07:33 AM
  5. workbookname
    By khalid79m in forum Excel General
    Replies: 1
    Last Post: 12-29-2006, 11:57 AM
  6. Print Refedit range?
    By T.c.Goosen1977 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-06-2006, 10:19 AM
  7. [SOLVED] passing range from RefEdit control
    By Greg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2006, 11:55 PM
  8. RefEdit on Userform to pick up range in another workbook
    By jase in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-02-2005, 12:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1