+ Reply to Thread
Results 1 to 2 of 2

shift to right, syntax problem

Hybrid View

  1. #1
    Registered User
    Join Date
    04-09-2012
    Location
    Italy
    MS-Off Ver
    2021 Pro
    Posts
    98

    shift to right, syntax problem

    Hi all !! i have a problem with the execution ... it hangs on the Resize shiftright;
    please is it written correctly or should change something ? tx! paolo

    Option Explicit
    Public i as Long
    
    Sub Mia()
    Dim aWB As Workbook
    Dim aWS As Worksheet
    Set aWB = ThisWorkbook
    Set aWS = aWB.Worksheets("L")
    'On Error Resume Next
    For i = 2 To 1000
    If aWS.Range("A" & i).Value <> 0 Then 
    Call MiaBis
    End If
    End Sub
    
    Sub MiaBis()
    Sheets("LList").Range("CAA" & i).Resize(0, 5).Insert Shift:=xlToRight
    End Sub

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: shift to right, syntax problem

    Hi
    First You have lack of "next"

    and change resize(0,5) into resize(1,5)
    Last edited by tom1977; 05-17-2012 at 06:52 AM.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

+ 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