+ Reply to Thread
Results 1 to 8 of 8

I can not paste the code in message

Hybrid View

  1. #1
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    I can not paste the code in message

    I will try to insert the code here. just a sample

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: I can not paste the code in message

    It's not working
    I'll try again:
    With [a3:j3].Resize(k)
        .Value = y
        .Sort Key1:=.Cells(1, 1), Order1:=xlAscending, _
              Key3:=.Cells(1, 2), Order2:=xlAscending, Header:=xlNo, MatchCase:=False
    End With

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: I can not paste the code in message

    Quote Originally Posted by nilem View Post
    It's not working
    I'll try again:
    With [a3:j3].Resize(k)
        .Value = y
        .Sort Key1:=.Cells(1, 1), Order1:=xlAscending, _
              Key3:=.Cells(1, 2), Order2:=xlAscending, Header:=xlNo, MatchCase:=False
    End With
    looks to me like its there?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: I can not paste the code in message

    looks to me like it worked?

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: I can not paste the code in message

    FDibbins, no, my code does not appear in the message
    I created a new book .xlsm and now try to attach it to the post
    Attached Files Attached Files

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: I can not paste the code in message

    It's fantastic, I copy the code from the VBE editor to the message, and add code tags, click "Post Quick Reply" (I've done it hundreds of times!). But now my message just disappears.

    Edited:
    I'll try to add some other code
    Sub ertert()
    Dim x, i&, j&, k&
    x = Range("A1").CurrentRegion.Value
    For i = 1 To UBound(x)
        For j = 1 To UBound(x, 2)
            If x(i, j) = 1 Then
                k = k + 1
            End If
        Next j
    Next i
    End Sub
    Last edited by nilem; 08-11-2013 at 12:48 AM.

  7. #7
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: I can not paste the code in message

    Yes, the other codes are inserted well.
    However code to "Книга1.xlsm" is not inserted in the message
    I downloaded the file from the forum and used the OP code (only added a few lines)

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: I can not paste the code in message

    Just created a message with the code in another forum thread. And it works.
    I do not know, apparently the problem was in the OP file

    I should point out this topic as Solved?

+ 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. error message when someone does not paste into 2 cells
    By mmctague in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-27-2013, 11:28 AM
  2. [SOLVED] Insert a message with paste
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-19-2010, 12:29 PM
  3. need code to copy text from workbook and paste it in a new outlook message
    By rammergu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-19-2009, 07:36 AM
  4. need code to copy text from workbook and paste it in a new outlook message
    By rammergu in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2009, 02:39 AM
  5. Copy and Paste via message box
    By light in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-28-2007, 11:24 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