+ Reply to Thread
Results 1 to 3 of 3

Macro to select cell and open import dialog box

  1. #1
    Registered User
    Join Date
    10-30-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro to select cell and open import dialog box

    Hello there excuse my excel noobness


    I want to run a macro that looks at a cell on a sheet within the workbook and if it is empty it opens the import file dialog box ( for which i am using SendKeys ("%ddd") *with the aforementioned cell selected*, else displays a dialog box saying the cell has a value in it.

    I’m looking at something like this:

    Sub Useless_macro()
    Sheets("Sheet1").Select
    Range("A1").Select
    If ActiveCell = "" Then
    SendKeys ("%ddd")
    Else
    MsgBox "There is a value in this cell"
    End If
    End Sub

  2. #2
    Registered User
    Join Date
    10-30-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macro to select cell and open import dialog box

    ie i want to look at cell A1 on Sheet1 and if it is empty open the import dialog box with that cell selected...

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Macro to select cell and open import dialog box

    There is plenty of help forthcoming, but first . . .

    Per the Forum rules you agreed to follow, please amend your post and add code tags to all VBA code. Highlight all of the code, then click the # button.

    Thanks.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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