ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   A couple of questions (https://www.excelbanter.com/excel-programming/319406-couple-questions.html)

Orin

A couple of questions
 
Hi, I am trying to do several things in Excel. Before I ask for any
help, I feel obliged to mention that I'm mostly self-taught, so please
go easy on me. Ok, now that the formalities are taken care of here are
my questions:

1. Is it possible to lock a sheet in a way that it cannot be scrolled
past certain range? My "work area" is in range from A1 to M17, and I'd
like to disable users from scrolling out of that range.


2. I also wanetd to add info about the "program". What I had in mind was
to click on a button in the sheet for a window (something like ABOUT in
MS programs) to appear with the text I'd input. Can it be done, or
should I start thinking about something else? In case the above can
actually be done, how would I protect that window?


thanks



--
Orin

Frank Kabel

A couple of questions
 
Hi
Question 1: One workaround: Hide the remaining rows / columns
Question 2: Insert a command button and sor a very simple 'About box assign
some code such as

sub commandbutton1_click()
msgbox "About" & vblf & "This is my about text"
end sub

--
Regards
Frank Kabel
Frankfurt, Germany
"Orin" schrieb im Newsbeitrag
...
Hi, I am trying to do several things in Excel. Before I ask for any
help, I feel obliged to mention that I'm mostly self-taught, so please
go easy on me. Ok, now that the formalities are taken care of here are
my questions:

1. Is it possible to lock a sheet in a way that it cannot be scrolled
past certain range? My "work area" is in range from A1 to M17, and I'd
like to disable users from scrolling out of that range.


2. I also wanetd to add info about the "program". What I had in mind was
to click on a button in the sheet for a window (something like ABOUT in
MS programs) to appear with the text I'd input. Can it be done, or
should I start thinking about something else? In case the above can
actually be done, how would I protect that window?


thanks



--
Orin




Ron de Bruin

A couple of questions
 
Hi Orin

You can set the scrollarea in your workbook open event.
Copy this in the thisworkbook module and Save/Close/Reopen the file

Private Sub Workbook_Open()
Sheets("sheet1").ScrollArea = "A1:M17"
End Sub

2) how many characters ?

Sub test()
MsgBox "Hi the" & vbCrLf & vbCrLf & _
"This is line 1" & vbCrLf & _
"This is line 2" & vbCrLf & _
"This is line 3", vbOKCancel, "Your program name"
End Sub

Or use a userform




--
Regards Ron de Bruin
http://www.rondebruin.nl


"Orin" wrote in message ...
Hi, I am trying to do several things in Excel. Before I ask for any
help, I feel obliged to mention that I'm mostly self-taught, so please
go easy on me. Ok, now that the formalities are taken care of here are
my questions:

1. Is it possible to lock a sheet in a way that it cannot be scrolled
past certain range? My "work area" is in range from A1 to M17, and I'd
like to disable users from scrolling out of that range.


2. I also wanetd to add info about the "program". What I had in mind was
to click on a button in the sheet for a window (something like ABOUT in
MS programs) to appear with the text I'd input. Can it be done, or
should I start thinking about something else? In case the above can
actually be done, how would I protect that window?


thanks



--
Orin




Orin

A couple of questions
 
In article ,
says...
Hi Orin

You can set the scrollarea in your workbook open event.
Copy this in the thisworkbook module and Save/Close/Reopen the file

Private Sub Workbook_Open()
Sheets("sheet1").ScrollArea = "A1:M17"
End Sub

2) how many characters ?

Sub test()
MsgBox "Hi the" & vbCrLf & vbCrLf & _
"This is line 1" & vbCrLf & _
"This is line 2" & vbCrLf & _
"This is line 3", vbOKCancel, "Your program name"
End Sub

Or use a userform


Ah, thanks a bunch guys. It worked like a charm. One more question...in
the message box I wrote my e-mail address, and I'd like to turn it into
a hyperlink. How can this be done?

Also I managed to figure out how to leave only the OK button in the box
:)


here's what I have

Sub test()
MsgBox " " & vbCrLf & vbCrLf & _
"Ovaj program je napravljen za pomoc pri pretraživanju
registratora." & vbCrLf & _
" " & vbCrLf & _
"© Orin Balenovic 21.12.2004" & vbCrLf & _
" " & vbCrLf & _
" " & vbCrLf & _
", vbOKOnly, "SAP helper 1.0"
End Sub


--
Orin

Auric__

A couple of questions
 
Orin wrote in
:

In article ,
says...

Or use a userform


Ah, thanks a bunch guys. It worked like a charm. One more
question...in the message box I wrote my e-mail address, and I'd
like to turn it into a hyperlink. How can this be done?

Also I managed to figure out how to leave only the OK button in the
box
:)


As Ron mentioned, use a userform. Put your email in a label and give
it a click event that launches the user's default mail app:

Private Declare Function ShellExecute Lib "SHELL32.DLL" _
Alias "ShellExecuteA" (ByVal hwnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long

Private Sub Label1_Click()
ShellExecute 0, "open", "mailto:your.address@here", "", "", 0
End Sub

--
auric underscore underscore at hotmail dot com
*****
You have what you want, give the people air!


All times are GMT +1. The time now is 08:24 PM.

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