-
- dynamic creation of userform
by jiml27
- 10 Replies
- Last post
by Andy Pope
- I am trying to create a userform dynamically. I am having limited success, and have a few questions. For early binding, I use this code:
Code Snippet
Public UserForm1 as UserForm The question, then, is how to instantiate the userform The code that I use for late binding does not work:
Code Snippet
set UserForm1 = ThisDocument.VBProject.VBComponents.Add(3) and nei
-
- Access Records to Excel using VBA
by jagotaas
- 1 Replies
- Last post
by ADG
- Hi Everyone
What is the fastest way to run a query on a access table and copy the resultset to an Excel Spreadsheet(I am using Office XP).
The Access Database I have has about a million records. I have written code but I is taking a long time to run. I am using the following Code.
Private Sub FillXL(Store As Variant, DistFolder As Variant, District As Variant, Region As Varian
-
- Excel Userform - Runs fine but other users get a compile error
by suznal
- 7 Replies
- Last post
by suznal
- I have a userform that is called from a keyboard shortcut. It works perfectly fine when I run it, but other users cannot run it on their machines. We all are using Excel 2003 SP3, (only one user has SP2) and all users have changed their security to allow macros. But when they try to load the form they get a compile error.
The code I have for the userform is...
Code Block
-
- Is there a way to abort during runtime
by ke wenzel
- 5 Replies
- Last post
by JoAnNaT
- Hi, If I am running a VBA program in MS Access 2003 that has a programming error such as an infinite loop, is there a way to abort the program without killing Access from the task manager (and losing any unsaved changes) KW
-
- Excel VBA Macro Problem
by Otaking
- 1 Replies
- Last post
by Shasur
- I am having a problem with some macro. The thing is i need a macro that reads a .txt file, and checks if certain conditions are met.
The code i use to read the file is:
Code Snippet Open "c:\textfile.TXT" For Input As 1
The thing is, that when i try to validate the amount of blank spaces before a line, it doesn't read them. I saw too that the output of the txt file in the
-
- error 1004 - unable to get insert property of the pictures class
by suznal
- 2 Replies
- Last post
by suznal
- I have some code that works behind a command button to insert a selected image file into a cell on a worksheet. If the user clicks the 'Cancel' button on the 'getfilenamesaveas' window an error message displays...
"Error 1004 - Unable to get Insert Propeerty of the Pictures Class"
Am I missing something in the code (see below)
Private Sub CommandButton1_Click() Range("A
-
- public variable between sheet code and userform
by class11
- 1 Replies
- Last post
by Andy Pope
- Hey,
I created a public variable in sheet code and assigned a value to it. Now I want to be able to call a userform from the sheet code and use the value I established in the Userform code.
Is there a way to do this
-
- VBA Web Query through a javascript link
by Catalin Damian
- 0 Replies
- Last post
by Catalin Damian
- Hello all!
I try to run a VBA web query but the web page reffered in url is behind a javascript function (__doPostBack()). How can I get the data automatically Maybe I shouldn't use VBA
Thank you very much!
-
- adding text to cell with vba script
by Derek at Potters Clay
- 5 Replies
- Last post
by magicalclick
- I've done this before but I am completely blanking on what I am doing wrong with adding text or in this case a formula to a cell. The line I have and am getting an error on is
Workbooks("DSL Annual Rollup").Worksheets("DSL Annual Rollup").Cells(i, 3)="January!D"&i&"February!D"&i&"March!D"&i&"April!D"&i&a
-
- Extending and Customizing Communicator 2007
by doantd
- 1 Replies
- Last post
by MS ISV Buddy Team
- Extending and Customizing Communicator is mentioned in Microsoft Office Communicator Automation API help file. Does anyone have any experience with this Any help, blogs, examples would be much appreciated. Thx. Thinh.
-
- include crm3.0 accounts page in an IFrame
by einish
- 8 Replies
- Last post
by einish
- I have a web solution developed in framework 1.1 and using crm 1.2
I'm migrating from crm 1.2 to crm 3.0 and I faced the following problem.
I used to display this page http://<server name>/SFA/home_accts.aspx in an IFrame in my website to display all accounts same for contacts i used http://<server name>/SFA/home_conts.aspx In CRM 3.0 I cant find the corresponding pages. o
-
- Can I disable keys in Excel while a cell is selected?
by Gurileck
- 4 Replies
- Last post
by Gurileck
- I have made use of the onkey function in vba to disable most keyboard shortcuts, however if the user is in the middle of entering text into a cell, he can press any of the disabled shortcuts and they will work. Is there any way to make them stay disabled
-
- Adding data in one column based on another column using VBA
by Andrus1
- 3 Replies
- Last post
by Andrus1
- I have an Excel DB in which there are identical entries in some of the fileds. I need to identify those entries, delete one of them so I can keep the other one in the DB and sum their corresponding value in another column.
EXAMPLE:
A 23
B 12
A 10
C 20
I need to get the following result:
A 33
B 12
C 20
This seemed easy, but I can't
-
- Null Value Error in recordset
by Roborean
- 2 Replies
- Last post
by Roborean
- I have encountered a problem when returning a record set which contains a Null value. Please can any one help
I am trying to determine if a date field against a client is empty but if it is empty, when I try to get the value, I get an error message when it gets to dteDateCreated - "Invalid Use Of Null"
Dim SQLText As String Dim rs As Recordset Dim strClientCode Dim
-
- Copying Named Ranges
by foid025
- 2 Replies
- Last post
by foid025
- I have a worksheet with a number of named cells (so that I can put data in them or retrieve data from them with VBA and not have to change anything should rows / columns be added or removed). I have a sort of template file from which I copy and paste the spreadsheet with all the named ranges to create a series of new files. The problem is, the cell names do not copy, so they do not appear in any o
-
- Imprting text file with no delimiters into excel file
by Peck Chun Hua
- 8 Replies
- Last post
by Mezhick
- hi anyone,
i have a problem in creating a macros that will import an txt file into an excel file,
the text file has no delimiters but every single different characters will have to be in a specific cell.
For example in the first line, first 2 character belongs to excel cell A!, then next 10 characters is B1, then next 8 Character C1 and last 3 character is D1.
Regards
P.Chun
-
- problem using DoCmd.TransferText method
by dpjoshi49&#64;hotmail.
- 0 Replies
- Last post
by dpjoshi49&#64;hotmail.
- Hi,
I am using ms-access 2002. I have to export the data of a ms-access table in Fixed Width format.To accomplish this I am using DoCmd.TransferText method.
DoCmd.TransferText acExportFixed, "schema.ini", "table_ABC", "C:\testing\TestData.txt"
But I am getting error message: "Run time error-3625 The text file specification 'schema.ini' does not exist
-
- Code for labels in MsgBox
by une
- 5 Replies
- Last post
by Andy Pope
- I want my VBA code to output a message box that contains text and labels. I want the dimensions, positions, colours and captions of the labels to be based on the values assigned to variables within the same VBA Sub. Is this possible Can anyone provide a basic example Would a UserForm be more appropriate Thanks.
-
- iexplore.exe - Application Error
by ThickPrettyKitty
- 0 Replies
- Last post
by ThickPrettyKitty
- I am also getting this error- one BIG BIG problem tho...My IE does not open at all. So I cannot go to tools and try all these different solutions. I click on IE and it turns to the hourglass and goes back to the normal pointer- it does not open then after several attempts to open IE I get the error message that we all know and hate: The instruction at "blah, blah, blah" referenced memory
-
- "File Not Found" - DLL Problems
by IanWright
- 0 Replies
- Last post
by IanWright
- I'm running a VBA module within Access and having a few issues with it. When I run open my form that kick starts the module it either runs fine or gives a "File Not Found" error message with regards to a custom C++ DLL file that is being included. So far it works on 2 machines, and doesn't work on 2, and I can't establish what the cause is. I do know its not a typo, that DLL is definitel
-
- trying to highlight selection in a combobox on a userform
by yoshikatsu
- 3 Replies
- Last post
by yoshikatsu
- Hi,
I have a combobox embedded in a frame in a userform. I populate the combobox and make its initial selection in the userform_initialize() event and then set the focus to that combobox.
What I would like to do is for the current selection in the combobox to be highlighted (ie text and background inverted, like when you double-click on a word in text, so that the user knows that the first t
-
- Sorting cells in a spreadsheet by colour
by Josh Ord-Hume
- 7 Replies
- Last post
by crainsworth
- My apologies if I am asking this question in completely the wrong forum. I am trying to create a VBA macro that will order data in an Excel spreadsheet according to colour (so that like colours are all grouped together). I wonder if somebody would be kind enough to spend some time explaining how to do this to a more or less complete VBA novice! Many thanks...
Josh Ord-Hume
-
- faster code for a reccursive file count/size in excel vba?
by lyosha
- 2 Replies
- Last post
by duck thing
- ive got some code to do a reccursive file counts, i need to get the total count of files and sizes for a range of folders.. is there any way to speed up my code.. i am pretyt new to this and i know my code is kind of ugly, thought this would be a good place to start..
what the actuall excel sheet looks like:
a place to paste file paths, sometimes 10 sometimes 200 folder paths, and a button t
-
- Variable - VBA Excel
by VBAuser
- 2 Replies
- Last post
by VBAuser
- Hello!
I have something like that:
Sub teste() Dim count As Integer count = 2 Rows("2:count").Select End Sub
This is giving me an error: "Type mismatch" How can I pass a value throw a variable
How can I fix this
-
- Excel VBA - Best way to SQL Insert if SQL Update fails
by HMote
- 3 Replies
- Last post
by ADG
- What would be the best way to do this Try/Catch
I was trying to check all the records to find the date/hour key but I thought there might be a better/quicker way to check if the record exists...or rather, if the update fails. Would this work Is there a better way to do this or is my thinking wrong Is there a way to check if an update fails...would it throw an exception
Thanks for