+ Reply to Thread
Results 1 to 13 of 13

How can I import a dropbox to another sheet using macro?

  1. #1
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    How can I import a dropbox to another sheet using macro?

    in Sheet "Slutgiltigadimensioner" cell B3 I have a drop-down list. This i Want to import to Sheet "Indata" cell Q7. How do I write the code?

    I have currently written this code but it only gives the value of which you choose in the drop-down list:



    Please Login or Register  to view this content.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: How can I import a dropbox to another sheet using macro?

    try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: How can I import a dropbox to another sheet using macro?

    See the attached example using Mumps1's code.


    Regards, TMS
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: How can I import a dropbox to another sheet using macro?

    I modified the code you gave me just a bit into this:

    Please Login or Register  to view this content.
    But it only gave me a value of "TRUE" in cell Q7

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: How can I import a dropbox to another sheet using macro?

    That's because your code doesn't do the same as Mumps1's code does. He uses the Copy Method with a destination range.

    Your code is effectively comparing two things ... and coming up with TRUE.

  6. #6
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: How can I import a dropbox to another sheet using macro?

    Oh Okay. TMS your code gives the arrow pointing down when pressing on cell Q7 But it only appears "1 dropped down cell". Not the whole list appears. I tried your example and that is exactly how I want it but it doesnt work like that when I paste it inside my module 1 code. How come?

    I pasted this:

    Please Login or Register  to view this content.
    Where CalcDims() is my macro that i run

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: How can I import a dropbox to another sheet using macro?

    I have no idea. I just made up a small sample to test the code that Mumps1 provided. You probably need to upload your own example so we're all working off the same data.

    Regards, TMS

  8. #8
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: How can I import a dropbox to another sheet using macro?

    Excelforum2.xlsm123hjälp.jpg

    The picture above shows how it appears. I have uploaded my example

  9. #9
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: How can I import a dropbox to another sheet using macro?

    The screenshot is not very helpful. Can you post a copy of your file?

  10. #10
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: How can I import a dropbox to another sheet using macro?

    Hi Mumps. The copy of the file is in the same thread as the screenshot (Excelforum2.xslm) Thank you.

  11. #11
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: How can I import a dropbox to another sheet using macro?

    Try the attached file. First of all cells Q7 and R7 were merged so I had to unmerge them. You should avoid merging cells in Excel if at all possible because they most often cause problems when using VBA. Then I highlighted the drop down source range and gave it a name (ValList). I used the range name as the source in the Data Validation. The macro is in Module 2.
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: How can I import a dropbox to another sheet using macro?

    That worked very well. Thank you very much for your help!

  13. #13
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: How can I import a dropbox to another sheet using macro?

    My pleasure.

+ 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. Excel VBA Code to upload a file to Dropbox using the Dropbox API
    By gb# in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2014, 03:41 PM
  2. macro to copy based on dropbox value
    By ashwin272012 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-24-2013, 02:08 PM
  3. [SOLVED] Macro to open a file on Dropbox from any computer
    By ricdamiani in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-30-2013, 02:48 AM
  4. Connecting worksheets with in Dropbox via Macro?
    By LDouble3 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2013, 03:53 AM
  5. How to make macro automatically run once new file comes in on dropbox???
    By t_gagliardi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2012, 10:25 AM

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