+ Reply to Thread
Results 1 to 2 of 2

Get selected Excel's cell value within a Visual Studio 2013 Add in for Excel 2013 [VB]

  1. #1
    Registered User
    Join Date
    12-27-2014
    Location
    Israel
    MS-Off Ver
    2013
    Posts
    1

    Get selected Excel's cell value within a Visual Studio 2013 Add in for Excel 2013 [VB]

    I am creating an Add in for Excel 2013 using VS 2013. I am trying to process the data stored in the selected Excel cell (the active cell) upon Add in button click.

    My question is how to retrieve:

    a. the value of the selected cell/s in code

    b. the value of column E for the selected row/s.

    The following code reads the value of a know and defined cell (e.g. A11):

    Please Login or Register  to view this content.
    How to do the same for the currently selected cell/s? Thanks.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Get selected Excel's cell value within a Visual Studio 2013 Add in for Excel 2013 [VB]

    Set a string variable to the text of the active cell
    Dim x1 As String
    x1 = ActiveCell.Text


    Set a two dimensional array to the values of the selected range.
    Dim x1 As Variant
    x1 = Selection.Value
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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. No PowerPivot in Com Add ins Excel 2013 (Microsoft office professional plus 2013)
    By benoj2005 in forum PowerPoint Formatting & General
    Replies: 7
    Last Post: 09-18-2014, 09:13 AM
  2. Use Excel VBA to operate on selected text in Word 2013
    By GCW esq in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-15-2014, 10:14 PM
  3. [SOLVED] No Colour Formatting in Excel 2013 and Word 2013
    By pt68 in forum Excel General
    Replies: 4
    Last Post: 09-15-2014, 03:25 PM
  4. Replies: 3
    Last Post: 07-20-2014, 11:46 AM
  5. Link Excel 2013 to Word 2013
    By drosen99 in forum Word Formatting & General
    Replies: 20
    Last Post: 02-26-2013, 08:20 PM

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