improve speed in vba automation?
360717
let suppose in excel\n\nuse a line of code at top\n\nApplication.ScreenUpdating = False\n\nthis will simply disable screen refreshing when working in the codes so it will improve the speed.\n\nalso avoide using nested loops\nalways use long or integers don't use double or single variable types\n\nand remove the duplicate loops
191754
MS word automatically does a word count for you
949673
highlight the them all then ctrl c and paste into exel as a CSV instant spreadsheet!
383056
what kind of program are you doing?? all i know is visual basic stuff
881302
Obviously depends on what you're using it for.  Some easy ones:\n\n* Formula updates - can do hours of manual calculations for you automatically in a second, and redo them if a base value changes.\n\n* Sorting - can be sorted on one or more columns, allowing you to easily rank data or create an alphabetical list.\n\n* Cut/Paste - changes/additions/deletions are all relatively painless, whereas on paper they might make you redo the entire thing.
588815
This is a shot in the dark, but you may be able to write a macro using vb to create the key stroke. Good luck!
379626
Try the Visual Basic Bible.  It'll set you back around $50, but it's an awesome book.
523331
You might consider linking an instruction to refresh the pivot table to the Excel event that is triggered when a user jumps from tab to tab. But this would only work if they could be expected to move around in the workbook and not remain on one tab.\n\nFor example, I inserted this code in each excel sheet object. When a user moves to a different tab, I have instructed Excel to refresh a particular PivotTable (which in my system is called "PivotTable2", and happens to be on "Sheet1".\n\nPrivate Sub Worksheet_Activate()\nSheets("Sheet1"). PivotTables("PivotTable2"). PivotCache. Refresh\nEnd Sub\n\n(The sheets refresh command is all part of one line - this yahoo screen may break it on to two lines!)\n\nIf you wanted to use this kind of trigger, then you would need to insert this coding on EACH worksheet object (not the modules of course). If you have many PivotTables that need to be refreshed, then you can write one macro to refresh them, and then call the refresh macro from the worksheet objects. (The refresh macro would be stored in a module.)
968405
Saves you having to type the same code a hundred times to get the same tasks done a hundred times in succession.\n\nA loop lets you use the same code over and over again. Very beneficial.\n\n///
543882
#1.  You are assuming that the active worksheet is the first one in the book .. if it's not, it will bomb ... see ActiveSheet property\n\n#2.  You are assuming that the macro/VBA is running in this book, but if the user has multiple workbooks open, this may not be the case ... see ActiveWorkbook object.  Better?  Select Workbooks by name (see Tag values independent of filenames)\n\n#3.  Font, color, bold are meaningless for a programming problem.  Omit them for future clarity in asking a question.  Less meaningless stuff we have to wade through.\n\n#4.  Cells(1,1) depends on where the active cell is, the user or your macro may be jumping to a different place than you think it is.  Has someone inserted a row or column ?\n\nI've been doing VBA for 15 years and I have no clue what you mean by "The server threw an exception" ... you mean what ?\n\nClues as to how to fix ... use named ranges and offsets.  Name a range (always relative to the range).  Offset from there.  Always select the correct window, workbook and sheet by name, not index value.  Omit needless code from your recorded macros such as "Transpose=False" ...\n\nStop recording macros and trying to make them work.  Recording is good to get you started, not for real code.\n\nAll in all, it's a very nice semi-adjusted recorded macro.\n\nI'm not dissin' on ya Partner !   ;-)\n\nThere are good habbits and there are bad.  Learn the good habbits and life will be a cake-walk.\n\nAlways define a marker cell ... typically the top/right corner of your range or table or whatever.\n\nAlways reference everything from that point.\n\nLock the worksheet to prevent users from inserting/deleting rows/columns.\n\nUsed named sheets ... not index values.  All one has to do is insert a sheet and you're hosed.\n\nSuspenders and a belt ... this is Visual Basic here ... anything can happen.\n\nHere's a useful link for you ... just understand that here, you're pretty much expected to know your stuff or be very, very concise and specific in your inquiries and responses ...\n\nhttp://www.tek-tips.com\n\nI would encourage you to look through the forums and judge for yourself before you post.\n\nGood luck.  If I can help you out, my contact info is in the Bio.  There is always more than one way to do things ... collect the best, chuck the rest !   ;-)
746767
Tab is a key build-in Excel file to jump from one cell to the next one.\nThat is why you couldn't do it easily.\nDo you have to use 'Tab'?\nIf yes, then you need to make a macro in each sheet with this name\nPrivate Sub Worksheet_SelectionChange(ByVal Target As Range)\n\nThis will run whenever a cell is selected, (including 'Tab')\nso you need also to check if the 'Tab' is pressed using ASCII code.\n\n\nmail me if you need more info\n\nEnjoy my profile, I am the VBAXLMan
999231
use the Macro Recorder to code the procedure you want...then you can convert it to VBA (Visual BASIC for Applications) and edit it.
1146521
Private Sub SomeObject_KeyDown(KeyCode As MSForms.ReturnInteger, Shift As Integer)    \n    If KeyCode = vbKeyLeft Then 'left arrow = vbKeyLeft = 37\n         Call cmdLeft_click\n    End If\nEnd Sub\n\nyou may want to try other events pending on the app you're working on
706029
I would suggest Crimson Editor http://www.crimsoneditor.com it's free, has built in FTP support, and also supports syntax highlighting to make reading the code easier.\n\nYou can also download a trial copy of Macromedia Dreamweaver® 8 at http://www.adobe.com/downloads/
738595
Try this:\nRange("a1").Select\nc_value = Trim(ActiveCell.Value)\nmsgbox ("You have " & c_value & " cookies")
521317
Doing this is a little tedious but can be done. The tedious part is the first part.\n\n1- Let's assume that each sheet has a name with no spaces (i.e. sheet1, sheet2, etc) AND each of the 134 sheets has the same number of rows and columns. Copy the data area from sheet1 into a new sheet and 'paste link'. You'll have to do a find/replace and change each column letter to have a $ before it (i.e. d to $d$). Add the second $ to take care of the rows at the same time.\n\nCopy the data area in this new sheet under itself so now you have two identical sets. Do the same copy paste under operation 134 times (or until you run out of rows).\n\nOnce you have this done, you are going to have to do 133 find/replace operations and you are searching for sheet1 and replacing with the next sheet. Make sure you highlight the areas of interest. For example, on your second find/replace, highlight all the data under the first section. On your third, select all areas under the thinrd section. That way you aren't replacing the stuff you already did. example, your first set ends at row 100. Highlight row 101 to row 65,536, replace sheet1 with sheet2. Third set, also 100 rows. Highlight row 201 to 65,536 find/replace sheet2 with sheet3, etc.\n\nTedious & time consuming but if you aren't willing or don't know how to code in VBA, the easiest way to do it.
421773
MS access will do that, \n\nlookfor help in excel for JET or OBDC