Results 1 to 1 of 1

Get Rows and Count from user selected Area (by cursor)

Threaded View

  1. #1
    Registered User
    Join Date
    12-19-2011
    Location
    Triesenberg
    MS-Off Ver
    Excel 2010
    Posts
    1

    Get Rows and Count from user selected Area (by cursor)

    Following code used to work in earlier Versions of EXCEL:

    Sub RechnungErstellen()
       Mappe = ActiveWorkbook.Name
       RufBlatt = ActiveSheet.Name
       With Application.ActiveWorkbook
          With ActiveSheet
             zo = ActiveCell.Row
             i = Selection.Rows.Count       ' <-- causes run time error
                                                        ' Run-time error '-2147319784 (80028018)': 
                                                        ' Method 'Selection' of object failed
             zu = zo + i - 1
             For z = zo To zu
                RgDat = .Cells(z, 1)
                Rechnung_Initialisieren
                Posi_in_Variable
                ActiveWindow.SelectedSheets.PrintOut Copies:=1
             Next z
          End With                            ' ActiveSheet
       End With
    End Sub
    Can anybody help?
    Last edited by Paul; 12-19-2011 at 05:10 PM. Reason: Fixed code tags for user, forgot the brackets, [ ] around code and /code.

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