Results 1 to 5 of 5

error Icon 400

Threaded View

  1. #1
    Registered User
    Join Date
    04-26-2012
    Location
    sydney
    MS-Off Ver
    Excel 2003
    Posts
    7

    error Icon 400

    Hi all,

    I regularly extract a excel sheet from a financial system. I grabbed portions of VBA coding (i am not a coder) on the net so i can do the following smoothly and easily:

    A- insert of image from hardrive
    B- assign this image a CTRL +F function
    C- highlight the row and column of the current active cell to easily read related information on one line

    and

    D- I recorded a macro to reshaped the file presentation in a click.

    those macros are stored on a "extractionsupport.xlsm" file. so when i do a Excel extraction from my financial system in a file called "data.xls", I open the "extractionsupport.xlsm" at the same time containing macro recordings , and launch those macro from and for "data.xls"

    A and B work fine, but c doesn't (nothing happens) and D : i got an red cross error icon with the text "400".
    Strange thing is that if i launch those macros on the hosted file ("extractionsupport.xlsm"), it works fine.

    here is the coding :

    Sub InsertPicture()
    Dim MyCell As Range
    Dim MyPicture As Picture
    Dim image$
    image = "P:\Procurement\Financials\E.purchasing\e.purchasing admin\e.purchsing banner for excel extract.jpg"
    Set MyCell = ActiveCell
    MyCell.Select
    Set MyPicture = ActiveSheet.Pictures.Insert(image)
    With MyPicture.ShareRange
    .LockAspectRatio = msoFalse
    .Height = MyCell.Height
    .Width = MyCell.Width
    End With
    MyCell.Select
    End Sub
    Sub OpenFindDialog()
        Dim dFind As Dialog
        Set dFind = Application.Dialogs(xlDialogFormulaFind)
        dFind.Show
    End Sub
    Private Sub Worksheet_Change(ByVal Target As Range)
     If Target.Count = 1 Then
       Application.EnableEvents = False
       Union(Target.Offset(1, 0).EntireRow, Target.EntireColumn).Select
       Target.Offset(1, 0).Activate
       Application.EnableEvents = True
     End If
    End Sub
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Count = 1 Then
        Application.EnableEvents = False
        Union(Target.EntireRow, Target.EntireColumn).Select
        Target.Activate
        Application.EnableEvents = True
     End If
    End Sub
    Sub mef()
    '
    ' mef Macro
    '
    
    '
        Rows("1:1").Select
        Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
        Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
        Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
        Rows("1:3").Select
        With Selection.Interior
            .Pattern = xlSolid
            .PatternColorIndex = xlAutomatic
            .ThemeColor = xlThemeColorDark1
            .TintAndShade = 0
            .PatternTintAndShade = 0
        End With
        Rows("4:4").RowHeight = 28.5
        Rows("4:4").Select
        With Selection
            .WrapText = True
            .Orientation = 0
            .AddIndent = False
            .ShrinkToFit = False
            .ReadingOrder = xlContext
            .MergeCells = False
        End With
        Selection.RowHeight = 34.5
        Range("B5").Select
        ActiveWindow.FreezePanes = True
        Rows("1:3").Select
        Selection.RowHeight = 21
    End Sub
    I hope this is clear ...
    I don't understand any piece of code... so i am really lost... your help would be much welcomed :)
    thank you so much guys !!!

    Celiostat

    ps : let me know if you need more piece of information ! or the excel file
    Last edited by Leith Ross; 04-26-2012 at 08:34 PM. Reason: Added Code Tags

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