+ Reply to Thread
Results 1 to 4 of 4

CTRL-A + CRTRL-T using VBA

  1. #1
    Registered User
    Join Date
    01-20-2020
    Location
    Wroclaw
    MS-Off Ver
    Excel 2013
    Posts
    18

    CTRL-A + CRTRL-T using VBA

    Hi there,

    I would like to turn the a range of populated cells (the size of the range is supposed to change every time) into a table.
    Manually I would do this by pressing CTRL-A first and CTRL-T then.

    I want to create a macro for this and I tried with the script below.
    However when it gets to the last line it returns "Run-time error '5':Invalid Prodecure call or argument".
    Can somebody help me fix this issue? I attached a sample.
    Thanks in advance for your help


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by skifizzo; 04-27-2020 at 12:10 PM.

  2. #2
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: CTRL-A + CRTRL-T using VBA

    Hi, if you would change this line into:
    Please Login or Register  to view this content.
    it will work
    Cheers
    Erwin
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

  3. #3
    Registered User
    Join Date
    01-20-2020
    Location
    Wroclaw
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: CTRL-A + CRTRL-T using VBA

    Thanks Erwin, it worked!
    I am very grateful!

    Wish you all the best

  4. #4
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: CTRL-A + CRTRL-T using VBA

    No variable required.

    Please Login or Register  to view this content.

+ 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. Replies: 4
    Last Post: 04-27-2021, 11:49 AM
  2. Disable Ctrl+A, Ctrl+C and Ctrl+V in Excel
    By wedzmer in forum Excel General
    Replies: 5
    Last Post: 05-10-2018, 03:59 AM
  3. [SOLVED] CTRL+C & CTRL+V copy single but pasting tab delimited spaced
    By Jack7774 in forum Excel General
    Replies: 4
    Last Post: 03-20-2015, 08:23 AM
  4. Disable cut,copy,paste(including ctrl x, ctrl c n ctrl v)
    By Ramboexcel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2014, 01:00 AM
  5. Help needed : Unable to use CTRL+C or CTRL+D to copy formula
    By Elangovan89 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2014, 10:20 AM
  6. Replies: 3
    Last Post: 08-02-2013, 12:06 PM
  7. Ctrl+pg up and Ctrl+pg Down Dont work, New & unprotected documents
    By desert_dweller5 in forum Excel General
    Replies: 2
    Last Post: 09-10-2012, 07:44 AM

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