I have an array called myArray(3).
It's values are myArray("12", "5", "12", "35")
I want to copy each value into a cell on a spreadsheet. Usually I do something like this:
i=0
Do while i < 4
Range("A1").Offset(0, i).Formula = myArray(i)...
I do a macro on a selected range, but it errors out if the range contains no data.
What's the appropriate error checking to do to allow me to put an error message in?
Thanks.
I save a worksheet as an .xla file to be used as an add-in. In the worksheet, I've created a custom toolbar (and named it). However, when someone else tries to use my add-in, they get the code behind it, but not the toolbar. How do I get the toolbar to work?
Do I have to code it? If so, how...
I have the following command in my code:
DoCmd.OutputTo acOutputForm, , acFormatXLS
It allows me to export the forms data to Excel. A standard Microsoft window pops up with the directories, so I can save the file.
However, if I "Cancel" at that time, my original form returns an...
Here's my insert into statement:
INSERT INTO tbl_2002YTDAmounts_V2
SELECT [GL_data].[VendorName] AS VendorName, [GL_data].[PS_Num] AS PS_Num, [GL_data].[VendorID] AS VendorID, [GL_data].[GL_Num] AS GL_Num, sum([GL_data].[2002YTDAmount]) AS 2002YTDAmount
FROM GL_data
GROUP BY [GL_data].[GL_Num]...
What's the best way to export data to excel from a form...
Here's my situation:
Main form user presses a button. This button should export the results of a query to excel. However, the query uses parameters built in the main form (from listbox, textboxes, etc.)
I have a multi-select listbox. On the listbox_click event I want to do an If statement to see if a particular row was the one most recently selected.
Is that possible? Right now, I can only figure out how to tell if it is selected at all, not if it's the one most recently clicked.
Thanks.
I have a report that I want the user to be able to run from a form and select a sort order from a combo box.
Currently I use an If statement to check which value is chosen from the combo box.
I have 3 versions of the same report:
rpt_Test_SortByX
rpt_Test_SortByY
rpt_Test_SortByZ
So, based...
I have a rather complex SQL that is used to build/run a report. Part of the where clause I need to build in VB because it uses multiple rows from a multi-select listbox.
Can I only build that part of the where clause in VB and build the rest of the query in Design mode and somehow link the two...
I have a multiselect listbox with the following values:
*
Pacific
Texas
Northeast
Southeast
Those are divisions. I'm running a query which brings back values based on what is selected in the listbox. In my VBA code, I cycle through the selected listbox rows and build an IN statement...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.