I have some code that requires access to the Visual Basic Project. If the user hasn't checked this option in Excel, I'd ideally like to open up the security form for them, with code like the below:
Application.Dialogs(xlDialogOpen).Show
However, I can't find the dialog constant for the security form. Does anyone know it, or have any alternatives? I don't want to use SendKeys.
I have a userForm (Form1) that contains a persons name that I would like to reference in a separate UserForm (Form2). In the separate UserForm (Form2) I need to reference this persons name many times, so I was wondering if there was a was to declare this name in the separate UserForm (Form2) as a constant. Only thing is that a constant, to the best of my knowledge, must be an expression and not a variable. Mainly, I'm trying to avoid declaring the myName variable in each Sub within Form2, which it will be needed for a ton of Sub's.
Code for Form2: Const myName As String = Form1.txtName.Value
I have a sheet that will not let me use macros. I can record them, but when I go to use them it says that the Macro security level is too high. I change it to Medium or Low but it doesn't make a difference.
The same spreadsheet works with Macros on another computer, but not my main one.
I have a spreadsheet that I regularly have to clear the data and start over on, so i recorded a macro for clearing this rather long sheet with only one cllick.
My problem is that i am not the only person who will use this sheet, if They click the control button by mistake they will clear their work and you cannot undo it. I was wondering if i could make it ask "are you sure" kind of like the save option when closing an unsaved document.
We have developed an Excel workbook with hundreds of lines of VBA code written for a specific application, and we would like to protect it.
Could someone give me an idea of what security options we have over and above the below (if any)?
We have protected all sheets and the workbook itself with passwords. The VBA itself is protected with a passoword.
My understanding is that VBA can be hacked into quite easily.....is there any way of adding another layer of security/protection without having to move to another platform altogether?
i am going to ask is for my curiosity only and to be sure that no one will break my password. If the VBA module is locked for viewing and password protected, it can't be cracked??I asking this, because i made an excel application with macros, and i don't want the user of it to crack my password. I have to mention that the password is 17 letter+spaces long. I repeat again....i asked this ONLY for my application safety.
Is it possible to use a contstant array in Excel VBA? I have tried several differnt ways to declare it, but the VBA editor keeps yelling at me. The following did not work:
So I have module1 -> Sub Macro1() module2 -> Sub Macro2() module3 -> Sub Macro3() module4 -> Sub Macro4()
I have declared
Option Explicit
Dim mdNextTime1 As Double Dim myEnter As Integer 'Dim myK1 As Integer 'Dim myK2 As Integer 'Dim myK3 As Integer Dim myK4 As Integer Const myC As Integer = 82 Dim Lastrow As Integer Dim myActualRow As Integer
If I have a cell which has been validated and has a drop down list of 4 names in it. I need it to prompt the user that when they choose there name and select, a window pop up or similar window appears asking for a 4 digit(or similar) code.
This is to stop others using peoples names against jobs they have completed so there is accountability if there are issues with information.
For each line I need it to re-prompt the user to enter the 4 digit pin so it cannot be tampered with.
Can anyone help with sending through a form and VB code possibly which I can copy into my spread sheet or a method I can use!
There are 2 cells on my spreadsheet where individuals must populate $ values. I want to put a security feature in the worksheet that would create a pop up warning to the user that one cell must be greater than the other.
B26 (Client Assets) must be greater than B41 (Dollar Impact), otherwise a dialog box pops up to indicate to the user that B41 cannot be greater than B26.
If I have a formula that I want to copy throughout a column, but I want to keep one of the parts of the formula constant, is there a short way to do this?
For example:
First cell is A1*O24 Second Cell is A2*O24 Third Cell is A3*O24
Right now when I try to copy the formulas, the second cell always reverts to A2*O25, which is not correct.
For a single column of values, the following macro counts the first value twice, how can i fix this? for example: A1 thru A5 are a,a,b,c,d the result is
a 2 a 2 b 1 c 1 d 1
and should be a 2 b 1 c 1 d 1
Macro:
Sub CountOfEachItem() Dim ListRange As Range Dim NewList As Range
I want to basically set a varible that can be called back into a multiple of documents I will try and explain this as best as I can but it is a fortnightly pay date... i.e. 22/04/2009 Wednesday... as the payroll is fortnightly I want to be able to use the current date or todays date in a future proof macro.
i.e. if todays date is the 14/04/09 then the next pay date has to be the 22/04/09, if this was run in two weeks it would be 06/05/2009.
I was thinking a long the lines of lock in one start date... 14/01/09, then adding increments of 14 days until todays date - variable + 14 * r = "-"
Option Explicit Public Const ARK As String = "Inddata-ARK" Public Const VVS As String = "Inddata-VVS" Public Const KON As String = "Inddata-KON" Public Const EL As String = "Inddata-EL" Public Const LD As String = "Inddata-LD" Public Const KØL As String = "Inddata-KØL" Public Const OpDat As String = "Opdatering"
And then macro's under it... So the aboce is in module "INIT_S". Now in another module "RUN_P" I have a sub-rutine that uses these constants with a select case. Likes this:
Sub OpEksInitNu() Select Case ActiveSheet. Name Case ARK With OpEks 'more stuff Case VVS 'more stuff Case KON 'more stuff End Sub
But when I try to run OpEksInitNu i comes with ambigious name with ARK as the error, later down I use another public constant. But i keep getting the ambigious name error.. What could cause that... I have tried to locate all ARK, VVS etc. to try to determine if it is used later on, but it's not! I only declare the constants one time, and no module is called ARK, VVS etc.
I'm looking to run several subs in a module which all refer to the same constant but I'm having difficulty defining that constant in a way that the various subs will accept. Basically I'm trying to define a constant LastRow. I am fairly new to VBA so am not sure whether to use a Get LastRow public property (which I tried to use and failed) or a Function and then how to make this readable by all the subs.
I was playing around with Macros on an excel file. I created a few and ran them. In the end, I didn't like the way they ran, so I deleted them all. However since I ran them in the excel file, every time I open the file it gives me a warning saying "Macros have been disabled."
Is there any way to remove the possible Macros ties/links from my file? I know I can disable the warning, but if I just want to remove the Macros ties to my file.
On sheet 2 is all of the information and tables etc.. for example prices and information for the combo boxes an such...i need to protect this sheet so no one can change anything on it
the problem is when i do so, and go back onto sheet 1 and say tick a checkbox or select something from the combo box is doesnt allow me to, the protection message comes up
i dont want this to come up on sheet 1, only on sheet 2!
i think its because i have links between the pages? like all of the info for the combo box is on sheet 2
my workbook is finally working the way it should but every time i open it i get a security warning window with the options disable macros, enable macros and more info. how do i get this to not show up every time it's opened. this workbook will be used by someone other than me and i don't want them to need to do anything but open it and use it.
I would like the security warning not to pop up when the workbook is opened. I have been able to turn it off for myself but I had someone else test it and each time it's opened the security warning pops up with the disable, enable messages. Is there a way to turn this off permanently so not matter who opens it it won't pop up?
My dad wrote me a VB programme to save me time entering repetitive data into an excel template for my business. At first it didnt work untilll i reduced security to low. Sice then I fried my computer and have had to reformat it with a diffirent version of windows, vista service pack 3. Now even on low security it doesnt work.
The little button in the worksheet to make the macro happen isnt visible or doesnt exist.