View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Export as picture

I don't see anything in that function that would cause the error.

Are you sure you clicked the ok button?

You could comment that "on error goto Brutt" line while you're testing.

And a cursory glance at Harald's code looks like he expects that range to be on
the activesheet. Did you activate the sheet before you chose the range?



tommy_gtr wrote:

Hello,

I understand that you don't want to open attachment and I thank you for
your interest.

I try to explain my problem with this code, but I think there is no
real solution.

So when I use this macro on various sheets it work very good and I'm
happy for that. but problem is that when i use it in one special sheet
in my project it doesn't work. The select range dialog appears, then I
select some range and then I click ok. and that's all .... no save as
dialog will appear.

I tried to run this macro through steps in VB editor.
I think that the problem is somewhere in this function:

Function SelectArea() As String
Dim Internrange As Range
On Error GoTo Brutt
Set Internrange = Application.InputBox("Select " _
& "range to be photographed:", "Picture Selection", _
Selection.AddressLocal, Type:=8)
SelectArea = Internrange.Address
Exit Function
Brutt:
SelectArea = "A1"
End Function

cause it jump over the line with "SelectArea = Internrange.Address"
straight to "SelectArea = "A1".

I dont know why ....

On any other sheet it works fine...

I found that when I change a width of some column that on some places
in sheet it works.

May it be caused by some limitation of excel ????

Thanks for your answer....

tommy

--
tommy_gtr
------------------------------------------------------------------------
tommy_gtr's Profile: http://www.excelforum.com/member.php...o&userid=26089
View this thread: http://www.excelforum.com/showthread...hreadid=479358


--

Dave Peterson