A couple of questions

  • Thread starter Thread starter Orin
  • Start date Start date
O

Orin

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
 
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
 
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 there:" & 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
 
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 there:" & 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 & _
"(e-mail address removed)", vbOKOnly, "SAP helper 1.0"
End Sub
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top