+ Reply to Thread
Results 1 to 8 of 8

VBA help - why does this formula copy/paste code not work?

  1. #1
    Registered User
    Join Date
    07-21-2006
    Location
    birmingham
    MS-Off Ver
    Excel 2007
    Posts
    12

    VBA help - why does this formula copy/paste code not work?

    Hi hi guys,

    can anyone tell me what is wrong with this coding??? it worked before and not it doesn't

    when i put it through i get a "debugging" message with below highlighted bit highlighted:


    plus, each time i run the macro, a part of it is repeated - although i just needed it to refresh the whole sheet so that it included any additional data which was subsequently input in to the "full details" tab

    cheers,

    Sham

    Please Login or Register  to view this content.
    Last edited by help-needed; 05-10-2012 at 09:26 AM. Reason: made title more specific

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: VBA help - can anyone solve this???

    Forum Rules
    Please read and adhere to these simple rules!

    1. Use concise, accurate thread titles. Your post title should describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change the title of the thread, click EDIT on the original post, then click the Go Advanced button, then change the title. If two or more days have passed, the EDIT button will not appear, and you need to ask a moderator to change the title.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: VBA help - can anyone solve this???

    3. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Select your code and click the [#] button at the top of the post window (if you are editing an existing post, press Go Advanced to see the [#] button). The result will appear like this in the post window:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: VBA help - why does this formula copy/paste code not work?

    see how many rows of data is selected with the command
    Please Login or Register  to view this content.
    if it is of a single row then the below line can trigger error
    Please Login or Register  to view this content.
    regards

    johnjohns

    When you are not sure where to go, every road takes you there!

  5. #5
    Registered User
    Join Date
    07-21-2006
    Location
    birmingham
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: VBA help - why does this formula copy/paste code not work?

    No, it highlights all the cells

    I have just noticed that the filter is still on, which is strange because the coding should have restored the cells without the filter

  6. #6
    Registered User
    Join Date
    07-21-2006
    Location
    birmingham
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: VBA help - why does this formula copy/paste code not work?

    problem solved...i just manually took the filter off...

    but there is one more problem which i just cant get my head around with the above coding...

    Everytime i run the macro, rather than refreshing totally based on the source tab ("full details") it refreshes without including the first few rows. That means that the spreadsheet is slowly get bigger with repeats...

    any ideas????

  7. #7
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: VBA help - why does this formula copy/paste code not work?

    Perhaps at this stage posting a sample w.book could help us understanding your issue better..

  8. #8
    Registered User
    Join Date
    07-21-2006
    Location
    birmingham
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: VBA help - why does this formula copy/paste code not work?

    Hi,

    I've attached the worksheet

    the first issue has come back again...you'll see what i mean when you try it.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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