Results 1 to 13 of 13

No error but no output

Threaded View

  1. #1
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    No error but no output

    Dear Friends,
    In this macro I want to resize picture in same size. The macro is not giving any error but also not giving required output. Please solve my problem. The code is as follows:

    Sub ResizePicing()
        Dim pic As Object, N As String, ws As Worksheet, R As Range, T As Single
         Set ws = ActiveSheet: ws.Range("g:g").ColumnWidth = 15.43: T = 10
        
        For Each pic In ws.Shapes
        If pic.Type = msoPicture Then
            If Abs(pic.Left - Range("g1").Left) < T Then
                        N = pic.Name
            If InStr(1, N, "Butt") Then GoTo GetNext
                pic.LockAspectRatio = msoFalse
                pic.Width = Application.CentimetersToPoints(1.85)
                pic.Height = Application.CentimetersToPoints(2.38)
            
    For Each R In Range("g1:g" & Range("B" & Rows.Count).End(xlUp).Row)
     
        If Abs(pic.Top - R.Top) < T And Abs(pic.Left - R.Left) < T Then
        pic.Left = R.Left: pic.Top = R.Top: R.RowHeight = pic.Height
            Exit For: End If: Next: End If: End If
    GetNext:    Next pic
    End Sub
    Thanking you in anticipation.

    Mukesh
    Last edited by Fotis1991; 09-11-2013 at 11:58 AM. Reason: added code tags..

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Access Query via Excel (ADODB) - no error, but no output!
    By cml111 in forum Access Tables & Databases
    Replies: 3
    Last Post: 04-23-2013, 05:33 AM
  2. [SOLVED] Can I suppress error output?
    By rfcomm2k in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-14-2013, 11:00 AM
  3. Cannot refer to 'error' = #N/A cell output
    By heatwave in forum Excel General
    Replies: 4
    Last Post: 03-09-2011, 11:10 PM
  4. [SOLVED] MATCH output error #N/A
    By RichH in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2005, 02:06 PM
  5. output to error log
    By tubbs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-06-2005, 06:10 AM

Tags for this Thread

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