+ Reply to Thread
Results 1 to 7 of 7

Error in converting excel columns ro RTF using VB script

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    chennai,India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Error in converting excel columns ro RTF using VB script

    Hi,

    I am getting the below error when concerting excel column to rtf.

    complier error:method or data member not found.

    below is the code i have used.

    Private Sub CommandButton1_Click()
    Dim i As Integer

    i = 2
    While Len(Sheet2.Cells(i, 1)) > 0
    Sheet1.ctlTwinACRTB1.RTF1Text = ""
    If Len(Sheet2.Cells(i, 4)) > 0 Then
    Sheet1.ctlTwinACRTB1.RTF1Text = Sheet2.Cells(i, 4)
    Sheet2.Cells(i, 6) = Sheet1.ctlTwinACRTB1.RTF1Text
    End If
    Sheet1.ctlTwinACRTB1.RTF1Text = ""
    If Len(Sheet2.Cells(i, 5)) > 0 Then
    Sheet1.ctlTwinACRTB1.RTF1Text = Sheet2.Cells(i, 5)
    Sheet2.Cells(i, 7) = Sheet1.ctlTwinACRTB1.RTF1Text
    End If
    i = i + 1
    Wend

    End Sub

    This i quite urgent..so please help me out.

    Thanks in advance

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error in converting excel columns ro RTF using VB script

    what is ctlTwinACRTB1? if it's a control added to the sheet it would seem the name is wrong or it does not expose a RTF1Text property
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Error in converting excel columns ro RTF using VB script

    Hello and welcome to the forum.

    Unfortunately your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    09-10-2012
    Location
    chennai,India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Error in converting excel columns ro RTF using VB script

    I am not really good at visual basic..there are two sheets..sheet1 has the column which needs to be converted to rtf and sheet2 has the vb interface..when i click the buttuon it throws the error.

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error in converting excel columns ro RTF using VB script

    until you comply with the moderator request I can't help you (I'm not sure I can anyway if you can't answer my questions)

  6. #6
    Registered User
    Join Date
    09-10-2012
    Location
    chennai,India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Error in converting excel columns ro RTF using VB script

    what is the information you need..??

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error in converting excel columns ro RTF using VB script

    please comply with the moderator request

+ 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