Consulting

Page 2 of 2 FirstFirst 1 2
Results 21 to 23 of 23

Thread: Outcome is not as expected - code might be wrong

  1. #21
    VBAX Regular
    Joined
    Nov 2017
    Posts
    22
    Location
    Quote Originally Posted by paulked View Post
    Sorry, the height and width are wrong, it needs to be done with:

                For Each cel In Sheets("DTE").Range("A" & (rw - 5) & ":" & "A" & rw)
                    Height = Height + cel.Height
                Next cel
                For Each cel In Sheets("DTE").Range("A" & (rw) & ":" & "G" & rw)
                    Width = Width + cel.Width
                Next cel
    Ahh I see. I have added
    .Columns(1)
    to Height and
    .Rows(1)
    to Width and this follows what I expected.

  2. #22
    VBAX Master paulked's Avatar
    Joined
    Apr 2006
    Posts
    1,007
    Location
    You need to write a flow chart or similar to map out exactly what your requirements are, if you know them. That way it lessens the chance of hitting another 'dead end'.

    I've got to go now, work beckons and it's gone 5am with no sleep! Hope you make some progress and catch up soon.

    Cheers

    Paul Ked
    Semper in excretia sumus; solum profundum variat.

  3. #23
    VBAX Regular
    Joined
    Nov 2017
    Posts
    22
    Location
    Thanks, Paul for your effort. I really appreciate it. Have a nice day

    P/s: I ticked this thread as solved since I have gotten pretty much 90% of what I want

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •