+ Reply to Thread
Results 1 to 5 of 5

The borders of the selected range

  1. #1
    Registered User
    Join Date
    03-23-2007
    Posts
    2

    The borders of the selected range

    Hi!

    How I can find the borders of the selected range?
    In particular: the first row/column and the last row/column
    to realoze export form Excel?

    It is my code...


    Private Sub AxWebBrowser1_NavigateComplete2(ByVal sender As System.Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event) Handles AxWebBrowser1.NavigateComplete2
    On Error Resume Next
    oDocument = e.pDisp.Document
    oDocument.Application.CommandBars("Standard").Position = Microsoft.Office.Core.MsoBarPosition.msoBarTop
    CheckBoxShowBar.Enabled = True
    End Sub
    The user select range for export...

    ...
    oDocument.Worksheets(1). - ??????

    ...

  2. #2
    Registered User
    Join Date
    03-22-2007
    Location
    Malaysia
    Posts
    21
    Hi,

    May be you can try this


    Please Login or Register  to view this content.
    -Fron-

  3. #3
    Registered User
    Join Date
    03-23-2007
    Posts
    2

    Unhappy How I can work with "Selection" in VB 2005?

    I can't understand how I can use "Selection" in my VB 2005 code.

    For example It is the working code
    HTML Code: 
    But how use "Selection" in it?

    oDocument.Selection does't work.

  4. #4
    Registered User
    Join Date
    03-22-2007
    Location
    Malaysia
    Posts
    21
    this is your code:
    Please Login or Register  to view this content.
    under this code, add:
    Selection.Borders
    .
    .
    .
    .
    may be you can give it a try

  5. #5
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Your 'oDocument' variable refers to a workbook while the 'selection' refers to application and not to workbook.

    In other words,
    you can do:
    Please Login or Register  to view this content.
    and not:
    Please Login or Register  to view this content.
    because in this case you don't have the variable to refer to application because you would write:
    Please Login or Register  to view this content.
    I hope it can help.

    Regards,
    Antonio

+ 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