473,396 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Button Password

1
BUTTON PASSWORD
When I activate a button to run a macro I want to be prompted for a password
is this possible ?

Any suggestions welcome.
Oct 17 '06 #1
1 1655
albertw
267 100+
BUTTON PASSWORD
When I activate a button to run a macro I want to be prompted for a password
is this possible ?

Any suggestions welcome.
it's possible
if you put your routine inside cmdBUTTON_click ...
this is just as simple example

Private Sub cmdBUTTON_click()
On Error GoTo Err_Handler
TryAgain:
Password = InputBox("Enter your password", "ButtonPassword")
If Not Password = "MyPassword" Then GoTo TryAgain

..... enter your code here ....

Exit Sub
Err_Handler:
End Sub

or you may get your password from previously stored place in the register

Private Sub cmdBUTTON_click()
On Error GoTo Err_Handler
RegPassWord = GetSetting "ApplicationName", "Properties", "PAssWordString", "")
TryAgain:
Password = InputBox("Enter your password", "ButtonPassword")
If Not Password = RegPassWord Then GoTo TryAgain

..... enter your code here ....

Exit Sub
Err_Handler:
End Sub

save your password using SaveSetting...
Oct 20 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: lsarg | last post by:
i've been trying forever to figure out a way to use a regular text link in place of a submit button at the bottom of this. can't get it. i'm just starting to learn php, so i'm stuck. any help at...
1
by: Antoni | last post by:
Hello, I wondered if anyone could further advice? In my script I was trying allow the user to enter a userid and password, and when the users clicks the login button. Pass these values passed to...
5
by: Michael Albanese | last post by:
I recently read an article that mentioned adding code to the onload event to "register a default button". The behavior i am after is that when the user hits enter, the form submits. Does...
4
by: Paul W | last post by:
On my simple login-screen I have a 'username' and 'password' field and an imagebutton for the 'OK'. This used to work nicely so that when the user hit <Enter> from the password field, it invoked...
0
by: John | last post by:
Hi I am using a login in template mode as I have customised it. I have added an image as a 'New User' button using the following code; <a class="button" href="Default2.aspx"> <asp:Image...
2
by: winnie_us99 | last post by:
Hi All, I am trying to do validation on my text field before going to the next page to create a user. It doesn't look like the next button will fire any validation. Am I missing something? Can...
3
by: Robert W. | last post by:
I'm new to ASP.net programming so excuse my ignorance if the following question seems overly simplistic. I've created a simple Login form with 3 primary WebControls: - A TextBox for the Username...
2
by: hemong | last post by:
Hi, wondering if anyone can help me I have created a form and user id, password that allows the user to submit and all this works fine however I want to create another button next to the ' > '...
3
by: rudeman76 | last post by:
Hi, I have a form that has no menu bar (so people cannot go playing) and when the admin presses the admin button they have to enter in a password. After they enter in the password the menubar...
1
by: pipestew | last post by:
tbl_Report - DBReportName - MenuReportName - FacilityID - ReportType - Viewable (Yes/No) - PasswordProtected (Yes/No) - Password (Encrypted) On MenuReport form...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.