I've created a button on a sheet that triggers the creation of a checkbox on the ActiveCell. I also want the checkbox to link to the activecell in order to use the TRUE or FALSE values in an AutoFilter. I used the following code, but the checkbox doesn't link to the ActiveCell. I thought it might be because the LinkedCell = "TEXT" whereas a Range isn't text?
Dim MyRange As Range
Dim CBLeft As String, CBTop As String, ctlName As String
Dim cbObj As OLEObject
Dim MyDoc As Worksheet
Set MyRange = ActiveCell
CBLeft = CallByName(MyRange, "left", VbGet) + 0.25 * CallByName(MyRange, "Width", VbGet)
CBTop = CallByName(MyRange, "Top", VbGet)...........................
I have a userform with a listbox that has 6 columns (D2:I50) which works great. In column J (J2:J50), I have data which needs wrapping so I plan on putting it in its own listbox. Is it possible to have another list box but one that operates as the first one is scrolled?
I have more than seven if statements but don't know how to connect them.
works =IF(C2=$A$2,13,IF(C2=$A$3,7,IF(C2=$A$4,5,0)))works IF(C2=$A$4,,IF(C2=$A$5,3,IF(C2=$A$6,3,IF(C2=$A$7,3,IF(C2=$A$8,3,IF(C2=$A$9,3,IF(C2=$A$10,3,IF(C2=$A$11,3,0))))))))can these be connected? they work for me separately but not all in one.
I've tried Named but that doesn't work because there are way too many things I need to do w/ it.
Im writing a program in VBA excel that displays two circles in excel spreadsheet, these two circles have been set X and Y Co - ordinates. Using the X and Y Co - ordinates i want to connect a line from shape 1 to shape 2
I was trying to move data from excel to access database in VBA. not sure if this has been done before.
What i have got at the moment is that there are some data in excel spreadsheet that i can dump into the table in the access database. My problem here is i need to be able to open the database first, set up connection, and then perform SQL insert query command.
So in the worksheet, i have a button with the following codes in it so far i could just manage to open the database as follows
how to do this with Java but not VBA, I have the capability of understanding it I just need to know where to look because I can't seem to find any solid information on the net from my searches. Does anyone have any websites, other threads or anything they could direct me to for this kind of thing.
I was contemplating putting this in the Access thread but I want to connect to Access through Excel so I think it fits both.
My plan is to use a macro to send specific cells to five seperate tables in an Access database using VBA and SQL.
I'm trying to get my macro to connect to Infomaker and run a query. I have successfully done this in the past by using the record macro function. But, when I try to record the macro and paste the query syntax from Infomaker into the commandtext box of the connection, I get the "too many line continuations" error.
I've been looking at ways to write the code rather than record, but the syntax for the Infomaker queries doesn't seem to mesh well.
The syntax of the query in Infomaker is (copy/pasted, all "'s are necessary):
I have 3 checkboxes; when one is checked, a set/range of rows should be visible. Only 1 checkbox should be checked at a time.
If checkbox 18 is already checked, and checkbox 20 is then checked, I want the first checkbox unchecked and the rows for checkbox hidden.
I'm using the following code. It works great as long as I check and uncheck the same box before attempting to check another box. But if Checkbox18 is already checked with its rows showing, and I then check checkbox20, the checkbox20 sub runs and as I step through, it jumps to sub checkbox18.
How can I stop my subs from jumping from one to another?
Code: Private Sub CheckBox18_Click() If CheckBox18.Value = True Then Worksheets("TRF").Rows("36:41").Hidden = False Worksheets("TRF").Rows("42:64").Hidden = True Worksheets("TRF").Rows("65:76").Hidden = True CheckBox19.Value = False
Code: Sub Button1_Click() Dim cnt As ADODB.Connection Dim rst As ADODB.Recordset Dim stSQL As String Dim SNfound As String 'Your sqlserver 2008 connection string Const stADO As String = "Provider=SQLOLEDB.1;" & _ "" & _
but i dont see where to put in the Database object...
The Database it needs to connect to in SQl is called
The Server name is SQLSRV when you expand databases the database is called SWHSystem the Table is called dbo.Credential and from that i need to get SELECT All from the Name and CardNumber from dbo.Credential and put that in a New Sheet titled Personal
I have been using different keywords to find what I need. I have 3 checkboxes: cash, amex, other. I have a subtotal cell. When the appropriate checkbox is checked, the amount from the subtotal cell will auto go to the cell next to the checkbox. Is this VB?
I have two columns. One column has UPCs - some of which are duplicates. The second column just has number values. I'm trying to add the sum of all of the numbers in column two which are attached to their respective UPC. For example,
COL A///// Col B 11111111111///// 10 00000000000///// 15 11111111111///// 10 11111111111///// 4 00000000000///// 2
So, I need a third and fourth column to give me the total value for a single SKU(col A) of all the values in col B. In this example the Third column would contain the SKU, and the fourth column would contain the sum of all values in column B that are associated with the single SKU in column three. The third and fourth column would look like this:
COL C///// COL D 11111111111///// 24 00000000000///// 17
On the attached Dynamic chart I have attached there are 3 checkboxes to display certain data. My issue is this, if I click the outside checkbox and the ISE checkbox at the same time that is OK, it gives me a comparison of the two data sets in a bar chart. Perfect. If I click just the total checkbox it gives me the total info of the outside and ISE, again perfect.
But, If I click all 3, it doubles all the numbers because total is total and outside + ISE also equals the total.
My Question, -Is there a way to lock out a checkbox if another is active? if 1 then no 2 or 3. if 2, 3 is OK but 1 is not. if 3 then 2 is ok but 1 is not? -If it can't be locked can it do something like; If #1 has a check and you try to enter #2 a red error message could come up saying these two choices together the data will be inaccurate. I'm thinking this might be done in conditional formatting.
If option one is doable and easy, is it also possible to have an error message like in my second idea so people will know why they can't click that second box? This would be my preferred fix but I am open to any other option you may have to accomplish this.
I have 20 check/tick boxes on my worksheet (CheckBox1-20), each of the 20 tickboxs has its own linked cell A1-A20 - I wish to have another checkbox (checkbox21) that, when ticked will tick all of them.
Also, if unticked it will untick the 20. I'd like this to be a kind of "onclick" command - so that if I wanted to tick 5 of the 20 on their own, the "master" tick box won't interfere with this. If a command button is easier to code than this is just as good.
I've been looking online on on here for the last 2 hours with no joy, not even getting close.
I am using Form Controls rather than ActiveX controls.
I have a RibbonX checkbox that I have added to my ribbon. I am able to attach code to the OnAction callback and when the user clicks the box, the code executes properly. Now for my issue. How can I change the checkbox from checked to unchecked and vice versa within VBA?
My situation is this:
I store a list of employees with certain elements such as start date, department, title, etc. in a table. One of the fields is Inactive which shows whether they are active or inactive. I may want to see all the employees, or just the active ones. My checkbox will allow the showing of both inactive and active employees. The user may wish to save the default setting for this and so I have created a table that holds a Boolean True or False for whether to show inactive employees or not by default. The checkbox always shows unchecked by default when the workbook loads, and I want to change the textbox's checked state based upon the value in the table.
Create a macros, which sets any checkbox in the next excel file fist link http://narod.ru/disk/12388811000/car_test.xls.html or another link of the same file http://rapidshare.com/files/271305333/car_test.xls I can't find the name of any checkbox.