Nope, I'm afraid that this is the Data Validation manner I mentioned, I could do it but I need Combo Boxes controlled by VBA for my project
Good Morning Fellows,
Today I’m coming with a kind of hectic request and I’m sorry for that
However, I hope that I’ll find your usual kind assistance
Now, simply what I need to do is to build 4 Dependent Combo Boxes
Not 4 dependent data validation lists, I know how to do that but I don’t want this option, I need that 4 Dependent Combo Boxes option
I’ve attached sample sheet which is prototype of my original sheet
As you should see, I need the 1st Combo Box to include the options of X/Y/Z
And the 2nd one to include A/B/C or D/E/F or G/H/I, depends on the 1st selection
And the 3rd & 4th Combo Boxes to work the same way
I know that with Data Validation Lists, Name Ranges manner usually assist a lot
But here, with Combo Boxes, I’m not really sure how to manage the Name Range manner
Or is there any other way?
Please advise, I work in an important project and I need this part to accomplish it
the thing is that they are 4 dependant lists, not really sure how to manage this with the combo box
None of them worked
Maybe I'm doing something wrong
Just to confirm, the 1st code I have tried it putting it in seperated Module and in the same sheet, none worked
the second one, I'm not sure if I've adjusted it in a right way
The shee name I'm working on is H
And the list is located in Cell D10
And I needed font 20 for the list elements
I've tried the below adjustment but it didn't work
do I do something wrong?Code
[B]Sub Test()[/B] [B]Dim rngLists As Range[/B] [B]Dim listCell As Range[/B] [B]On Error Resume Next[/B] [B]Set rngLists = Sheets(H).D10.SpecialCells(xlCellTypeAllValidation)[/B] [B]On Error GoTo 0[/B] [B]If Not rngLists Is Nothing Then[/B] [B]For Each listCell In rngLists.Cells[/B] [B]listCell.Font.Size = 20[/B] [B]Next listCell[/B] [B]End If[/B] [B]End Sub[/B]Code
[B]Sub Test()[/B] [B]Dim rngLists As Range[/B] [B]Dim listCell As Range[/B] [B]On Error Resume Next[/B] [B]Set rngLists = Sheets(H).D10.SpecialCells(xlCellTypeAllValidation)[/B] [B]On Error GoTo 0[/B] [B]If Not rngLists Is Nothing Then[/B] [B]For Each listCell In rngLists.Cells[/B] [B]listCell.Font.Size = 20[/B] [B]Next listCell[/B] [B]End If[/B] [B]End Sub[/B]
But this will zoom in the whole sheet
Not good for my target
I need something working on the list element font size itself
I googled a lot to find something like that
But all I found was something working on zooming not the font size itself
I'm afraid they’re not the same
This’ll be applied on the selection you make from the drop down menu
But for the menu elements (in the list itself), this code won’t help
And basically I need the items of the list itself when you get the drop down shown, to be with bigger font
Guys, what is the way to define drop down list (validation data) in VBA?
I mean, I have a sheet with many drop down lists, and I’d like to refer to each one in VBA code trying to enlarge the list font size, there is no other way to do it through Excel Programme directly, and the only probable solution left is to try VBA somehow, any suggestions?
Re: Hide / Unhide Specific Name Range Using VBA
Cool man, it works like fire, you're life saver, thanks a million
Asking you for a quick help
Now I have the below VBA works properly to hide/unhide rows 2:4
Sub Trial1() Rows("2:4").Select If Rows("2:4").Hidden = True Then Selection.EntireRow.Hidden = False Else Selection.EntireRow.Hidden = True End If Application.GoTo Range("A1"), True End Sub
I’d like to twist it little bit here
Supposedly I’d name rows 2:4 to some Range Name, say Range Name “Magdoulin”
How I could rewrite the code to hide/unhide this particular range name in this case?
Why? Because I intend to build a sheet which would have very dynamic rows interred from time to time and writing the code depending on numbering the rows themselves would be a disaster in this case, so, please help me with that, thank you.
Re: Macro To Copy A Sheet Multiple Times And Name Sequentially
Ok, but what about if I wanted the created copies to be named from names written in some cells list as well?
supposedly I've created 5 copies
and I'd like to rename them from another sheet called "XX" for example from A1:A5
What would be the code in this case?
Re: Circular Error with Combined Share / Unshare VBA
Apologizes, done, thank you.
Hi guys, how are you keeping? I know, I have bothered you too much already and I’m still new member here. But please help me out with this, I’ll always appreciated.
Now, I successfully created my needed VBA code that I need to operate, the below one
Sub Procedure2() Name = Worksheets("Home").Cells(1, "M").Value On Error GoTo ErrHandler: Worksheets(Name).Activate Exit Sub ErrHandler: Sheets("Template").Select Sheets("Template").Copy After:=Sheets("Home") Sheets("Template (2)").Name = Worksheets("Home").Cells(1, "M").Value Application.ActiveSheet.PageSetup.CenterHeader = "&""Arial,Bold""&28" & Range("L1").Value End Sub
However, I got unpleasant surprise by the end, the thing that I need my sheet to be with the “Shared” mode most of the time, of course, you all realize now what was the surprise, yes, the VBA code will be disabled with this needed mode, I know, it is very basic rule, but I’m a kind of VBA novice, sorry for that
I googled what I could do as a work around, I found out that I could apply VBA code to disable the shared mode temporarily, till the original code takes place, and at the time of saving, I could attach pre-saving code which is simply the reverting action back to the shared mode
When I tested it, I found out that the RunAllMacros, which is designated to turn the shared mode off and to proceed with my original code, works fine at first time, and the other code to turn the shared mode back on at time of saving, works fine at first time as well, yet, when I try again, no, I’m getting error, it’s more like circular error or so
I can’t understand it, especially that it works fine for each code with the first time, this is happening again and again whenever the file is rebooted
I saved RunAllMacros in separated module, and of course the other macro responsible to turn the shared mode on in the workbook VBA as I read that it is a must when it comes to pre-save code
Could you check the attached and advise, what is wrong with it exactly? Thank you in advanced.
Re: Inserting Hyperlink Formula in VBA Code
Thank you so much for the quick response
I believe I managed it anyways earlier
But you were great help
Thank you again
Hi guys, how are you keeping? I'm new to this great forum and I hope that I'll find the need that I seek urgently.
Kindly check the attached file, now, I have this VBA Code:Code
Sub SheetCreator() Name = Worksheets("Home").Cells(1, "M").Value On Error GoTo ErrHandler: Worksheets(Name).Activate Exit Sub ErrHandler: Sheets("Template").Select Sheets("Template").Copy After:=Sheets("Home") Sheets("Template (2)").Name = Worksheets("Home").Cells(1, "M").Value Application.ActiveSheet.PageSetup.CenterHeader = "&""Arial,Bold""&28" & Range("K1").Value End Sub
Now, what I need to do really is to replace the first command "Name = Worksheets("Home").Cells(1, "M").Value" to let the VBA execute the formula used in Sheet 'Home'!B9 which is "=IFERROR(HYPERLINK((HYPERLINK(HYPERLINK(VLOOKUP(M1,'DB2'!A2:B24467,2,0),VLOOKUP(M1,'DB2'!A2:B24467,2,0)))),"Click Here"),"Click Here")” and when there is an error, I'd like VBA to proceed with the put error handler
When I try to execute this by replacing the first line of the VBA with the below:Code
I'm getting s syntax error, I've tried to remove the iferror part of the formula as well and got the same exact error, any advice guys?