i'm trying to insert an image on the top of the excel
the code im using is
Sub ClearAndClose()
Excel.Application.Quit
End Sub
Sub PrintPriceListF()
'
' PrintPriceListF Macro
' Comments
'
' Keyboard Shortcut: Ctrl+f
'
'Move the header to right
Range("A1").Select
Selection.Cut
Range("e1").Select
ActiveSheet.Paste
Range("A2").Select
Selection.Cut
'Delete the old (now empty) leftmost column
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Columns("c:c").Select
Selection.Delete Shift:=xlToLeft
'Open up the description column
With Columns(3)
.EntireColumn.AutoFit
.ColumnWidth = .ColumnWidth + 10
End With
'AutoFormat the UsedRange
ActiveSheet.UsedRange.Select
With Selection
.AutoFormat Format:=xlRangeAutoFormatList1, Number:=True, Font:=False, Alignment:=False, Border:=True, Pattern:=False, Width:=False
With .Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
End With
End With
'Modify this format
Range("c1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlTop
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection.Font
.Name = "Arial"
.Size = 49
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
'Modify this format
Range("b1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlTop
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection.Font
.Name = "Arial"
.Size = 24
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Rows("1:1").Select
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Interior.ColorIndex = xlNone
End With
'Set up the print to fill the page
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.BlackAndWhite = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With
Application.Dialogs(xlDialogPrint).Show
End Sub
any ideas

ned help with excel
Frails
PaulRyan
Hi Markis,
This code will insert an image to the active sheet.
ActiveSheet.Pictures.Insert("C:\17.jpg").Select
You could also draw an Image control onto the sheet and set it's picture property to the image you want to display. This would be better as you have more control over size, scale, and it's more dynamic.
Me.Image1.Picture = "C:\17.jpg" 'won't work without image control called Image1 on sheet.
Hope thats helpful
Americo
From this code it looks like it is using the VB that is provided with Excel. These forums are for VB.NET questions.
The VB within Excel is Visual Basic for Application. VBA is a very different product from VB.NET and there are some other locations where youy will probably get a quicker and better response to your VBA questions.
You may find more assistance in following which specifically deals with VBA development.
http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=74&SiteID=1
Or if you are using VBA from within on of the office applications
Office Automation: office.developer.automation newsgroup
http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.office.developer.automation&lang=en&cr=US
Or the Office Newgroups
http://www.microsoft.com/office/community/en-us/default.mspx d=1
Hope that helps
known2none
thanks for your help!