Userform As Printer Interface For Protected Workbook

Apr 21, 2014

I'm closing in on the final stage of a large project and I've run into a road block. The following line of code is preventing my users from being able to select specific page ranges when using the Print Entire Workbook option in the print menu.

[Code] .....

I've attached the latest version of my form (with significant support by jaslake) to explain what I'm attempting here. The attached form has several macros that activate upon open; including a user form. The password for the workbook/worksheets/VBE is "j".

Attached File : HCT-RCS ITP V1.89.xlsm

View 14 Replies


ADVERTISEMENT

Protect And Unprotect All Sheets And Workbook Using Userform Interface And Password

Jul 6, 2012

I am trying to create a way to protect and unprotect all sheets and the worbook by means of a Userform pop up interface.

I have managed to create the Userform but what the code will look like and where to place the VBA code that will make it work, Also i would like to automatically save the sheet/s as i switch between them. so that any updates made to the sheet will be automatically saved when i move to the next sheet and also when i protect or close the workbook.

View 3 Replies View Related

Userform As A Standalone Vb Main Interface

Oct 17, 2006

In order to beutify my prog's interface, i would like to open the Excel file(active VBA) with the worksheet in the minimized background or hide, i.e. only the Userform or a Dialog window, from the right beginning on! as if it was a standalone VB main interface.

View 3 Replies View Related

Userform Interface For Holiday Planner

May 29, 2008

I have one workbook with two worksheets (Jan-JUly and Aug-Dec). I am using a userform to add data into worksheet ("Jan-July"). But I do not have any clue - How do I update the other worksheet (same data like name,join year etc)worksheet("Aug-Dec") at the same time. I used two worksheets because worksheet doesn't support 370 columns, and to make my life easy. UserForm add data into Column A to M (worksheets Jan-July), rest is done manually. I have also attached the file.

Private Sub dataAddButton_Click()
Dim dataCheck, eMsg As String
Dim strLastRow As Integer
Dim x As Double
strLastRow = xlLastRow("Jan-July")
'get Last Row
With dataInput
'dataInput name of userform
If (.fNameBox.Value <> vbNullString And .fNameBox.Value <> vbNullString And .joinYearBox.Value <> vbNullString) Then
'textbox validation value can not be empty......................

View 2 Replies View Related

Work With Main Interface While Userform Is Open

Jul 18, 2007

I'm writing a program on VBA for Excel and I've succeeded in just displaying the Userform when opening the file. I have set the ActiveWindow.Visible option to False and the Application.Visible one to false as well so that i only have the user form displayed.

However, if i try to open an excel file via "My Computer", the file doesn't open. I also noticed that when I was leaving the application.visible option to True, i couldn't access the application while the userform was running. I think i need to do something with an event, but i can't find the event corresponding to opening a file oustide Excel.

View 2 Replies View Related

Getting Error When Userform Transfers To Protected Sheets

Jan 30, 2014

I have a userforms which transfers data to protected sheets.The userforms worked until i protected each sheet.Can there be any code which i add to the current userform code so it can still transfer the data to protected sheets

The other issue also is now that the sheets are protected the Outlining also does not work.Can this also be changed so the Outlining works on protected sheets

I have 5 userforms which all transfer data.

[Code].....

View 5 Replies View Related

UserForm Code Showing Cell Protected Message

Aug 24, 2006

I have a spreadsheet set up to automate calculations and control data input for in process quality control checks. The spreadsheet is basically a series of input boxes requesting information from the user. To control the input of part numbers I have some code for a userform which populates listbox within the userform from another closed spreadsheet (opens & closes without updating screen) & enters the selected data from the listbox into a selected cell in the spreadsheet

all the input boxes and calculations are working well, the userform works well, BUT when I include the userform within the code I get the following problem, an error saying that I am trying to change data in a protected cell where data has been entered and then protected by the VB code, even though the code is not trying to change the cell.

I have tried just loading and unloading the userform and everything works well, it only fails when I actually use the userform, and then close it. from this I am fairly sure the problem lies within the form so I have been through the form code line by line and deleted anything that is not vital and the problem persists. Here is the form

Private Sub CommandButton1_Click()
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Dim Part As String

Part = ActiveSheet.Range("B1")
Msg = "Are you sure you want Part No" & vbNewLine & Part ' Define message.
Style = vbYesNo + vbDefaultButton2 ' Define buttons.
Title = "SELECT PART No." ' Define title.

Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then ' User chose Yes.
Set_Data_1 ' Perform some action.................

View 9 Replies View Related

Double-Click Cell On Protected Sheet To Open UserForm

Apr 23, 2008

I have spreadsheet with client names. I'd like to build logic that will open a form with client information when a user double-clicks on the client name. But I have a couple of problems.

- First, I'd like to protect the sheet and hide the formulas. But when I protect the sheet, I get the "the cell or chart you are trying to change is protected" error when I double click the protected cell.

- If I deselect the "Select Locked Cells" options when I protect the sheet, I no longer have the ability to double-click on the cell.

how I can double click on a cell yet not allow the user to edit the cell (or see the formula)?

View 2 Replies View Related

Check If Workbook Is Protected

May 1, 2007

I just noticed that if you already have a workbook protected and then run code that will protect it, it will become unprotected! (I have a line of code to protect the workbook in the workbook_open event; incase the last user unprotected the book on the last use). Apparently it doesn't work like protected worksheets, where if the sheet is password protected and you have code that tries to reprotect it with a different password nothing will happen. I can not find a way to check if the workbook is protected (and if so skip, but if not then protect). Worksheets have "activesheet.protectcontents" to tell you True/False.

View 3 Replies View Related

Change Row Height In Protected Workbook?

Jan 21, 2011

I'm looking to enable changing row height in a protected workbook and am scratching my head as to if there is a combination of checkboxes I need to 'allow', or if there is some other approach.

I'm using a vba macro to change the height of merged cells:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single

[Code].....

View 2 Replies View Related

How To Unprotect A Workbook And Sheets That Already Protected

Mar 10, 2014

I have a workbook that is protected by password. I have to unprotect sheets.

How can I unprotect sheets and workbooks while I am updating or changing?

View 13 Replies View Related

VBA Macro Not Working When Workbook Is Protected

Apr 23, 2008

I wish I could have been more specific with my Title. This is what I am encountering. I used the McGimpsey code for generating a unique sequential number every time a workbook opens. I tailored the code to fit my needs and stuck it into my invoice sheet. For the longest time I was unable to make it work until I moved the code from a template to a standard workbook. Then I was able to make it work as long as the sheet was unprotected. I realized that to get the code to work I had to then unprotect the cells that the code was writing to. Now that I've done that I am getting errors in the code that weren't there before, rendering the macro useless. The code I am using is:

View 14 Replies View Related

How To Open Another Workbook That Is Password Protected

Nov 7, 2011

Code:
Sub Open_Test_File()
Dim wb As Workbook
Set wb = Application.Workbooks.Open("DesktopTest File.xls")
End Sub

This very simple little code opens a new workbook.

But if I add a password to the file that I'm going to open the password box appears.

What do I need to add to this code to automatically input this password?

I have tried putting this at the end:

Code:
Password:="123"
but this does not work?

View 2 Replies View Related

Link To Password Protected Workbook

Jan 24, 2012

I have a master for each manager that pulls a few values from each of their employees personal sheets.

The personal sheets (about 30) are individually password protected so only the owners can open them.

This is creating a security issues as the links in the master require the passwords for each of the "source" workbooks.

Is there any way to add some code so that the passwords do not need to be entered each time?

View 9 Replies View Related

Linking To A Password Protected Workbook

Apr 18, 2009

My question is as follows:

I have two workbooks in the same folder on a shared drive. Workbook2 is linked to workbook1. I have protected Workbook1 with a password protected to limit access.

When my collegues who use workbook2 try to open it, it asks for the password for workbook1 before opening. When they ignore that and go a head to open the file. The new information from workbook1 is not updated into workbook2.

How can i mentain my password in workbook1, and keep the files linked such that they can be able to see the new information in workbook2 without knowing the password for workbook1.

View 9 Replies View Related

2007 - Protected Workbook - Can't Unprotect It

Jun 15, 2009

I have a workbook that many moons ago I protected. Now I want the workbook to be an unprotected workbook so many users can view and update if necessary.

Typically I know you are supposed to go to: Review, Changes, Unprotect Workbook. But all that is available is to protect the workbook, but it is already protected. I know this because every time I open the workbook, I am prompted to enter a password.

Is there another way to remove this workbook protection I do not know about?

View 9 Replies View Related

Paste To Password Protected Workbook

Aug 25, 2006

I've got two files: the one that is the source file and the second one which is the target file. The target file is password protected (let us take the number 1 as the password in this case). I have a macro that would copy the value of an example cell to the target file:

Sub iso()

Dim wBook As Workbook

Range("A2").Activate

ActiveCell.Copy

On Error Resume Next
Set wBook = Workbooks("Test2.xls")

If wBook Is Nothing Then
ChDir "D:"
Set oWB = Workbooks.Open(Filename:="D: est2.xls")

to add a line (or two) to this code, that would open and unprotect the target file and then at the and protect the target file with the same password.

View 8 Replies View Related

Delete Special Cells And Protected Workbook

Mar 28, 2014

I have a code which deletes all contents of cell in range except formulas, from sheet 2 to 13. Code works, but I have included toggle button on each sheet to lock/unlock sheets.

If I lock sheets, code doesn't erase cells as needed.

I have figured out code that works for me, but looks like It's not performing quite correct. Although code executes quite quick...

This is my current code :

[Code] .....

How could I rearrange this code to work in proper order ?

View 4 Replies View Related

Work Around Running Macro On Protected Workbook?

Jun 5, 2014

I cannot run a macro because I am encountering error 1004, intersect of object. i am using a protected workbook, and I dont have the password to unprotect it, but it needs to be fill out using a macro from a different workbook. Is there a way around this?

View 1 Replies View Related

Enable Outlining In A Shared/protected Workbook

Apr 22, 2009

I would like to know how the following code provided in the Excel Help Best Practice Forums , used to enable outlining on a protected sheet, can be applied to a shared workbook.

Private Sub Workbook_Open()
With Sheet1
.Protect Password:="Secret", UserInterfaceOnly:=True
.EnableOutlining = True
End With
End Sub

After enabling 'Share Workbook' and re-opening the file it presents the following error:

Run-time error '1004': Method 'Protect' of object '_Worksheet' failed

View 2 Replies View Related

Recover Or Break Password From Protected Workbook?

Mar 1, 2012

I need something to recover or break a password from a protected workbook.

View 1 Replies View Related

Group/Ungroup In A Protected Shared Workbook

Aug 20, 2008

I used some code to allow grouping/ungrouping in a protected sheet. This works great! Enable Outline/Outlining on a Protected Excel Worksheet. However, when I share this protected workbook, all of a sudden grouping and ungrouping is not possible anymore. I get the same error as before, when the workbook was protected, not shared, and did not have the code mentioned above. Error: "You cannot use this command on a protected sheet. To unprotect..." Assumption: Is it possible that the Workbook Open Event is not being triggered if the workbook is a shared workbook?

Question: How can I group/ungroup columns in a shared (and protected) workbook?

View 6 Replies View Related

SAP Interface

Feb 19, 2008

I often need to retrive info from SAP and fill in an excel document with it. Is there a book or a web page where I can find macros that will help me do that?

View 9 Replies View Related

Updating Workbook From Password Protected Workbooks Automatically

Jul 7, 2014

I've 10 workbooks (which represent different areas around the factory) that populate a master workbook (belonging to HR).

We've now started to password protect the 10 workbooks. When i open the master workbook and click update - i get prompted to enter the passwords of the 10 workbooks

My question - is it possbile to automatically have the passwords entered so that the master can get updated?

View 1 Replies View Related

Sheet Tabs Disappear When Workbook Window Protected?

Nov 21, 2013

I have a workbook with multiple sheets. I would like to protect both the structure and window, but when I do this the sheet tabs are no longer visible when I reopen the workbook.

View 4 Replies View Related

Password Protected Macro Workbook - Remove Protection

Jun 6, 2014

In my office, our colleague locked his macros before he left. Now, I would like to continue in that but I have no idea, how to get into macro - to study it and change it as needed now.

How to open it?

locked one.xlsm

View 2 Replies View Related

Excel 2007 :: Running Macro From Protected Workbook

Mar 13, 2008

I have a macro with "ActiveWorkbook.Protect Password:="password"" . It was working fine in excel 2003. In excel 2007, because of this I am not able to run any macro's in the workbook. I am getting a message "The macro may not be available in this workbook or all macros may be disabled. I can see a security warning in message bar saying macros have been disabled, but I dont have have a option to enable the macros.

View 9 Replies View Related

Export (Copy) Sheet From Password Protected Workbook

Aug 18, 2006

I was handed a workbook that is password protected. The worksheets are not password protected. Because the workbook is protected, I cannot add or delete worksheets.

I figured that I could get around this by copying the worksheets to another workbook, but I can't even do that. Naturally, no one remembers what the password is.

View 3 Replies View Related

Interface With Attachmate

Jan 1, 2008

I'm trying to write a macro in Excel to interface with "Attachmate".

My problem is when I do a "CreateObject" I receive error for active x can not create object.

I looked in the Excel Ref Lib for either "Attachmate" or "Extra". and could not find them.

Does any one know for sure if Excel can work with "AttachMate" if so can you provide directions.

I'm using Office 2003 Pro, Windows XP.

As a side note I've read of "AttachMate" can be coded to work with "Excel", but so far not the other way around.

View 9 Replies View Related

Copy A Range And Paste Into Another Workbook - Files Are Password Protected.

Jul 17, 2008

I need to copy and paste a range from one workbook to another workbook automatically.

Basically, I have 180 files in a folder. The details are:

1) 90 master files

2) from these a range named "COPYTOE" has to be copied and pasted into another 90 report files.

3) I have list of files & its passwords in a separate file named FNAME.XLS. In this, Sheet1, A1:C the details consist like this: ....

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved