ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to Rewrite these Code? (https://www.excelbanter.com/excel-programming/311813-how-rewrite-these-code.html)

hce[_16_]

How to Rewrite these Code?
 

Hi Norman

I was trying to modify the code provided Harald Staff... In hi
original code, a dialog box will appear to ask for the range to b
saved as a gif... I wanted to pre specify it... so I have created
Function named Own and put the MyAddress = Own... Originally
"MyAddress" will take the range specified in the dialog box... Hope
have made myself clear... Please feel free to ask me any othe
questions...

Cheers

Function Own() As String
Sheets("Sheet2").Select
Range("K133:M144").Select
End Function

Public Sub GIF_Snapshot_Own()
Dim varReturn As Variant
Dim MyAddress As String
Dim SaveName As Variant
Dim MySuggest As String
Dim Hi As Integer
Dim Wi As Integer
Dim Suffiks As Long


Set Sourcebok = ActiveWorkbook
MySuggest = sShortname(ActiveSheet.Name)
ImageContainer_init
Sourcebok.Activate
MyAddress = Ow

--
hc
-----------------------------------------------------------------------
hce's Profile: http://www.excelforum.com/member.php...nfo&userid=351
View this thread: http://www.excelforum.com/showthread.php?threadid=26445


Norman Jones

How to Rewrite these Code?
 
Hi HCE,

I would not be comfortable attempting to amend Harald Staff's carefully
crafted code.If you wish to make substantive alterations, I would suggest
that you endeavour to elicit Harald's advice/assistance.

That said, for the purposes of your alteration, try dropping your Own()
function and and change:

MyAddress = SelectArea

to the static:

MyAddress = "K133:M144"


---
Regards,
Norman



"hce" wrote in message
...

Hi Norman

I was trying to modify the code provided Harald Staff... In his
original code, a dialog box will appear to ask for the range to be
saved as a gif... I wanted to pre specify it... so I have created a
Function named Own and put the MyAddress = Own... Originally,
"MyAddress" will take the range specified in the dialog box... Hope I
have made myself clear... Please feel free to ask me any other
questions...

Cheers

Function Own() As String
Sheets("Sheet2").Select
Range("K133:M144").Select
End Function

Public Sub GIF_Snapshot_Own()
Dim varReturn As Variant
Dim MyAddress As String
Dim SaveName As Variant
Dim MySuggest As String
Dim Hi As Integer
Dim Wi As Integer
Dim Suffiks As Long


Set Sourcebok = ActiveWorkbook
MySuggest = sShortname(ActiveSheet.Name)
ImageContainer_init
Sourcebok.Activate
MyAddress = Own


--
hce
------------------------------------------------------------------------
hce's Profile:
http://www.excelforum.com/member.php...fo&userid=3518
View this thread: http://www.excelforum.com/showthread...hreadid=264458





All times are GMT +1. The time now is 09:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com