Xls File - Option Explicit

Dec 18, 2007

Option Explicit ....

View 16 Replies


ADVERTISEMENT

What Does Option Explicit Actually Do

Aug 30, 2008

i've used this a few times at the top of various modules, as suggested by various knowledgable people on here, but it might be a good idea to find out what it means, and what it actually does!

View 9 Replies View Related

Option Explicit ....

Feb 18, 2007

I have some VB code "For, next" that I have written with numerous variables. All the data appears to be totaling correctly. After reading some comments on this site I added Option Explicit to the top. Well, it stops on my first For Each Cell, with cell highlighted and an error message 'variable not defined'. I have searched and searched and can't find what it might be. Does this error message mean I am getting incorrect results? Is there an easy way to determine which variable is not assigned? A function key or something?

View 9 Replies View Related

Option Explicit

May 3, 2007

I work on a worksheet that has 10,000 rows all in column A with members that have 353 different plans.

Here is an example:

Robert
James
Ted
Ronald
This is for plan 426-0
Amanda
Nikki

This is the total for plan 426-7000

I need to move the plan type for each member to column c. When moving the plan type I only want the number have the dash. For Robert/James/Ted in column C the plan type is 0. For Amanda and Nikki in column C the plan type is 7000. I have created a macro that can move the plan over but not the number after the dash.

Here is what I have come up with so far.

Option Explicit
Option Compare Text

Sub R007()
Dim i As Long
Dim sPlan As String

For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Left(Cells(i, 1), 5) = "Plan " Then
sPlan = Cells(i, 1)
Rows(i).Delete
Else
Cells(i, 3) = sPlan
End If
Next
End Sub

View 4 Replies View Related

Meaning Of Option Explicit

Oct 11, 2006

What does "Option Explicit" mean? What does it do/why is it used?

View 9 Replies View Related

Save Option Off The File

Dec 11, 2003

I want to be able to take the save option off the file in my macro to stop any user whos using the spreadsheet from saving full stop.

Is there a code where it will totally disable the save function, I have tried using the code for workbook protection, however this still aloows one to save.

View 9 Replies View Related

Lost The File Menue Option That Allows A File "Save As"

Apr 4, 2006

I have upgraded to Excel 2003 and have lost the File menue option that allows
a file "Save As".

View 9 Replies View Related

File/Send To Option Is Available On Laptop But Not On The Desktop

Dec 23, 2008

I have Excel 2002 installed on Desktop & my Laptop. The Send To option is available on my Laptop but not on the Desktop.

View 4 Replies View Related

Compile A Macro: Not Getting .exe File After Clicking On That Option

May 30, 2007

I'm done creating a macro. how can i do to compile it. I know there is an option in the tool bar, but i don't get any .exe file after clicking on that option. Do i need any compilator library or something?

View 5 Replies View Related

Remove/Disable Open File As Read Only Option

Apr 9, 2008

Is there a way to remove the option to open a file as read only when the file is already open by another user? Ideally when a user tries to open a file that is already in use they would get a message to that effect and the only option at that point would be for them to select "notify" when file is available.

View 8 Replies View Related

How To Supress Enable Macro Option While Open A Excel File

Sep 7, 2008

How to supress Enable Macro option while open a excel file. I would like to do it using VBA in Macro of excel 2007 + versions.

View 9 Replies View Related

Excel 2013 :: CF With 2 Option Buttons / Multiple Option Groups?

Sep 6, 2013

I have several option groups (Y & N in each) linked to cells to display TRUE / FALSE depending on which option is selected in each group. I have another cell which I want to apply conditional formatting to if EITHER Y or N is selected in all groups. At present I use COUNTIF to check for FALSE=0 in the linked cells which works if all the answers are Y. How do I apply CF if there is a mixture of Y & N (TRUE / FALSE) in all groups (I'm not sure if I've explained that well or not).

Excel 2013

View 1 Replies View Related

Explicit Hyperlinks, Relative Hyperlinks

Feb 21, 2007

I have a spreadsheet and within the first sheet there are lots of hyperlinks to other cells within sheet 1 (my template).

I have made a small macro which very basically makes a copy of sheet 1 (my template)

The hyperlinks in the template are explicit and as they are copied to sheet two, they still reference back to cells in sheet 1. I need the hyperlinks to be relative, so that when I make a copy of the template the hyperlinks are copied and make reference to cells in the new sheet. I cannot work out how this should be done

View 6 Replies View Related

Disable The "Save" Option From File Menu And Allow Only To "Save As"

Sep 24, 2002

How do I disable the "Save" option from File Menu and allow only to "Save as"?
Excel 97/2000

View 9 Replies View Related

Save Excel File As Another File Using Current Date As Part Of File Name

Oct 10, 2011

VBA coding for automatically saving an excel file as another file using the current date as part of the file name together with "32ga" as a constant add-in. I also what this macro to run at a particular time of the day let say 00:20hrs. The excel file i want to save as is always open . It has data that changes every 24-hrs.

View 1 Replies View Related

Option Group Box

Jan 24, 2007

If you have 5 option boxes in the group at the top of a form and want to make sure the user of the form selects at least one box before continuing on, how do you do that?

View 9 Replies View Related

Multi Option Sum

Jan 8, 2010

I want to sum data in COLUMN C that is related to COLUMN B if the COLUMN F is blank.

View 10 Replies View Related

Adding A New Option?

Feb 16, 2014

I have the following formula =IF((F3=1)*(H3=1)*AND(J3=1),1,0) and I do need to add the option C1 besides 1 so it would be something like this...

=IF((F3=1orC1)*(H3=1orC1)*AND(J3=1orC1),1,0)

View 7 Replies View Related

Right Click Option

Jun 7, 2009

I lost my right click option in excel, all I get is a little gray box that does nothing. I know it is something I did today, it has worked perfect before. Has anyone seen this happen, the problem is only in excell 2003.

View 2 Replies View Related

Set An Option Button By Name

Oct 8, 2009

In Excel 2003 VBA, what is the syntax for controling an Option Button or Checkbox by name or caption

I have tried the following but has an error, I am sure this is a simple one.

View 4 Replies View Related

VBA / Msgbox With No Yes And No Option

Jul 21, 2012

I am trying to have a msgbox come up if there is a path found it will pop up a msgbox for a few seconds then go away. Im trying to avoid the user from having to select anything just simpley telling them the connection is there then go away on its on. The code below is what Im currently using.

Code:
If Dir("H:") = "" Then
MsgBox "Error: Drive, path or file not found"
Else
MsgBox "OK: Drive, path or file found"
End If

View 9 Replies View Related

Option Buttons

Aug 23, 2007

I created a frame in a spreadsheet I put in 2 options buttons that I called Left the first one and Right the second one. I got 2 cells lets say C10 and G10 in these 2 cells I write the cell number values. When I click on button one or Left, I need the cell C10 be set focussed and write a number e.j 5. However, when click on the second butt to write a number e.j 7, the number in the cell C10 still there, so, what I need is a cero or an empty cell C10, and viceversa. Could you help to write a code for this problem.

View 9 Replies View Related

ParamArray Option

Nov 28, 2008

My purpose is:

1) I have a macro workbook with multiple procedures (6 main tasks)

2) Some workbooks will use all procedures, and some will not use all procedures (most use either 4 or 6 of the procedures)

3) To hide the unwanted procedures as required, the menus will not appear for those choices (in code that creates custom toolbars on activate)

Solution (proposed):

1) send a paramarray argument with string elements that identify menus to use

2) send a “show all” true or false, to simplify identification of workbooks that use all procedures

Reason solution is chosen:

1) I can basically have one macro workbook this way – so simple implementation even where some workbooks won’t need all the macros (and should definitely not be making them menu options).

2) If I add more routines, I can just extend the ParamArray as needed and continue to identify specific toolbar options to use or not use.

Problem:

1) That paramarray is interesting! It can’t be passed and its initialized as an array with bounds 0 to -1. Also, it can’t be tested directly to see if its Empty. So I came up with checking for the -1 UBound, combined with loading the elements into another array (seems stilted to me).

I’m not sure what I’m asking, but…I need to determine if the paramarray is being used, and be able to pass it. Is there a simple way to do that? As I’m sitting here writing I’m realizing I could just pass a regular array and dispense with the ParamArray option -- well, I’ll post my thoughts anyway. Sorry this is so rambling…

Here’s the code I’m using (basically). Note that DoSomething actually checks each element of the array to see if it matches a potential menu item (by name), and if so, marks that menu item to be added - since there's 6 menu options, I placed it in a separate method to avoid have it in the routine 6 times.

Maybe I'm just curious if anyone ever successfully uses the ParamArray option - it seems to me to be somewhat of a bother that you can't easily tell if it's been passed in or not, or use it like a regular array (check if its empty, etc.).

Sub MyToolbar(ByVal blnShowAll, ParamArray args() As Variant)
Dim a() As Variant
Dim x As Variant

View 9 Replies View Related

How Do I Make A Msg Box With Out Any Option

Dec 29, 2009

I made a msg box but i dont want any option to be displayed in it.. it only should display as an info to the user.

View 9 Replies View Related

Two Option InputBox

Mar 22, 2007

I am trying to simply the data input for someone who is not very experienced.

I have had some success but need to have an extra option in case of mistakes.

Ideally I need the following -

I want an inputbox that will appear when the user starts the macro and for example asks Enter Surname

Then I know what I want but I don't know how to do it.

I want a box to display the Surname that the user typed into the inputbox with a message asking Are Details Correct? with a Yes and No Button.

Clicking the Yes button moves onto the next inputbox clicking the No button cancels the whole macro before it enters data into cells.

View 9 Replies View Related

Set All Option Buttons To No

Jun 26, 2007

is there a way to set all yes/no option butons to "no" when a worksheet is activated?

View 5 Replies View Related

Adding A Second Option To COUNTIFS?

Dec 26, 2013

I have a COUNTIFS function that, among other criteria, only counts cells in which the value is "P". I now want to modify this function to count cells in which the value is "LA" in addition to cells in which the value is "P". I'm not sure how to work this into the argument. I tried using OR("P","LA"), but that's not working.

View 3 Replies View Related

Option Button Grouping

Dec 10, 2013

I'm trying to replace a bunch of checkboxes on a sheet with a bunch of Form Control Option Buttons. The problem I'm having is every option button I add seems to be grouped with all of the rest of my option buttons. If I add buttons 1 & 2, I need those 2 grouped together, and when I add 3 & 4, I need those grouped together. Currently it's grouping all 4 buttons together so 1 - 4 are linked, but I need 1 & 2 linked together, and 3 & 4 linked together. I've tried grouping, but it still doesn't function how it ought to.

View 13 Replies View Related

How To Unload Option Buttons

Jan 17, 2014

Attached I have kind of a score card, when you open the tab named TEAM1 a userform pops up and I pick the partners that played together, then I can pick an option button labeled 0,1,2 or 3, when it unloads, is it possible to make it put the corresponding number by their names in the empty row (W) of the week they are playing?, and not just the 1st open row available?

For example, if I pick the names Ryan and Stu the number will go under week 10 (X3) and not find the empty cell in (J3)?, I have no clue how to make this happen, but I made a userform to use, to try and make it work.

POOL LEAGUE TEST.xls

View 8 Replies View Related

ActiveX Option Buttons VBA

Mar 19, 2014

I am looking for a way to use 2 optionbuttons in vba. The option buttons are in different groups, and are independent.

I cannot get this to work. Is this even possible? In sheet1, the vba would read something like this.

View 9 Replies View Related







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