I've got excel entries with corresponding CheckBoxes. Is it possible to get the position of checkboxes (in this case I only need row number), or automatically renumber all of them from top to bottom each time I start a macro execution? Of couse, I can set "Don't move or size with cells", but I think it would be better still to be able resize cells at any time, so that controls adjust to these changes...
VBA Code of a custom control button, Scroll Bar, that mimics the same code as the corresponding form button, scroll bar? Where a cell is selected and the scroll bar changes the cell value from 0 to 100 in single intervals.
I have a user form where two command buttons are set with the following code:
Code: Private Sub CommandButton1_Click() Frame1.Visible = True Frame2.Visible = False
[Code]....
Now, when cmdbtn1 is clicked, frame1 is visible and vice-versa.
However, the position of both the frames on the user form are not on the same position on the user form. Indeed, it takes the position of the design view.
I want a code which will place the frame1 and frame2 at the same place and position on user form, irrespective of its position in the design view.
Looking for a userform command button macro "CommandButton1" to initiate a deletion of rows. Essentially "Combobox1" is a list of "Text" rows in columnA (after row16). I want the command button to delete the "Text" row chosen in the combobox and all rows below it until the next "Text" row. After this I want all "Number" rows below the chosen "Text" row to be renumbered by subtracting "1.000". The sequence of order I guess doesn't really matter as long as the desired outcome is achieved (meaning if for vba purposes it is better to renumber all rows below the "Text" row chosen then delete the "Text" row and rows between next "Text" row that is perfectly fine).
Within the ComboBox properties, is there anyway to control after "enter" his hit, you move to the right instead of down (similar to the edit under Tools/Options)?
I have created a userform within VBA which has a TreeView Control and a Spreadsheet control on it.
I have populated the TreeView control with data and what I want to be able to do is to drag the nodes off the TreeView control to the spreadsheet control.
I can drag onto a normal worksheet but not onto the spreadsheet control (the no drop mouse pointer keeps showing).
How do I determine which control the user is currently modifying on a multipage form (either changing, enterying or exiting the specific control). when I use "userform1.activecontrol" i get "multipage1" as the control name but I need the actual control on the specific active multipage. (also the .TABINDEX is for the multipage regardless of the on-page control) I use a generic data-field change SUBroutine so need the control name (and the TABINDEX) to provide my SELECT CASE. (so every fieldname_CHANGE calls the same SUB [with no parameters])
Has anyone out their ever seen an Calendar type of control totally built in an Excel vba UserForm?
My problem that Ive tried to resolve for some time is utilizing some type of pop-up calendar to eliminate format issues in my published Excel forms. I have tried a number of calendar controls but all have to be registered on the local machine and this cannot be guarantied for every machine.
If someone could direct me to a vba UserForm that has this built in that might do the trick. Or is their another way to deal with this?
I have some cells with some spaces and then text where I want to find the position of the first letter. Do any of you know about any function I can use?
The example below contain 5 spaces and then my name. It should give me the answer 6.
I would like to end a macro with a specific cell (e.g. E50) in the first cell in the upper left hand corner of the screen. How might I accomplish this?
In cell A2 I have text with a lot of /, so I need formula that will return the position of the before last / in the cell. (Or the last if above isnt possible).
I've written code that involves adding a number of new sheets to a workbook. I want to specify that each new sheet is positioned to the right hand side of all other sheets in the book, so that the sheets are positioned in the order (when reading from left to right) that they are added.
I know about the Copy After:= thing but I only know how to specify copying after a particular sheet name. I could solve my problem by each time referencing the sheetname from the previously-created sheet, but I think there must be a way to it properly.
I have created a button in an excel worksheet that when clicked, creates new tabs each containing a chart. I have tried to modify the code to position the chart within a specific range of cells on each tab, however, I have not been able to get it to work. Below is my code. Please see the code following 'Add the Chart.
VB: Sub AddCharts() Dim lastr As Long, r As Long Dim shname As String Dim ltitles As Range, rng As Range, rData As Range, x As Range, tbl As Range, r2Data As Range
On Error Goto ErrorCatch:
Set ltitles = Sheet1.Range("A3:N3") Set rng = Sheet1.Range("A4:A" & Sheet1.Range("A3").End(xlDown).Row)
[Code] ......
ErrorCatch: 'Debug.Print Err.Number 'Debug.Print Error If Err.Number = 1004 Then shname = x.Value & x.Row + 1 End If If Err.Number = 20 Then Exit Sub Resume End Sub
Formula/code to change the position of where the subtotals are placed. I don't want them appearing at the beginning or end of the data set but in a separate column beside each data set. how to access the code so I can try and alter it myself.
I use a Workbook with several Sheets. I want to be able to quickly move to the same cell (whatever cell is currently in use) up and down the Sheets. Ideally I would also like the chosen cell to be centered on the page as well!!
I'm am trying to find some way to determine if a particular tab falls before/after/between other tabs in a workbook. For example, if I have a tab "Top" and a tab "Bottom", I want to be able to determine if tab X is between them.
have an assignment to complete and one of the tasks I found impossible to complete. First condition is that it should be completed with a formula (not VBA). So here is the task - I have different cells with IBAN codes in them. The 14th position in the IBAN is used to identify the currency of the account. There are 3 possible numbers - 0, 1 and 2 and each is for different currency. So I have this table where I need to lookup the 14th character in the cell with the IBAN, from there the formula needs not only to check what the number is (0,1 or 2) but also to compare it to another table from where to decide which is the currency. I tried various combinations with FIND/SEARCH but can't find a way to do it.. and I can't find other functions/formulas that can isolate a particular character position in a cell..
I have the following code to display a toolbar everytime my template is open
'Show Custom Toolbar "Trade Log" on Workbook Open On Error Resume Next With Application.CommandBars("Trade Log") .Position = msoBarFloating .Left = 5000 .Top = 600 .Visible = True End With End Sub
(hope i wrapped the code quotes correctly this time ))))
I noticed that when you drag a custom toolbar to the far right of your screen - it locks in to a vertical toolbar space.
How can i position my toolbar in this place automatically by modifying the above code.