Answer Questions
ScoobySue Help with looping process excel macro
I have a spread sheet with personal records. so for example row 1 is name address and that kind of information. Row 2 is benefit information. Row 3 is spouse benefit information. The sheet contains thousands of people. What I am trying to do is insert headers for each individual so that the sheet is easy to read. Each line begins with a code. So column A is always 01, 02, 03, or 04. I am trying to make a macro that will recognize what is in column A, insert a line and then fill each row with the proper header. I have some code but it will only insert a header line over the first "02" row. I'm not sure why it won't loop through the whole spread sheet. Can you help Sub test() Dim Counter As Integer For Counter = Cel ...Show All
Rharve [Excel] How to convert Excel to jpg, gif image?
How to convert MS Excel to jpg or gif and paste/insert to MS Word thank you very much I doubt very much you can do that, or if you can it's a long difficult way to do a simple thing. If your looking to email parts of a spreadsheet your best bet is to format the cells into html/text and display them in the email message. How you go about putting the cells as html/text into an email message is another matter, if you co with copy and paste then the user needs to manually do the paste in Outlook, on the other hand if your sending the email through VBA interop with Outlook objects then all you need to do is create the email and set it's message body and address info. I ...Show All
Allen_Iowa Solved - Search all text objects - PowerPoint VBA
I need something very urgent. I am creating a search function for a custom addin. My search function ritght now searches only text placeholders. Is there any way of searching all text objects (text placeholders, textboxes, etc..) I don't think I need to go into text like text on graphs, more so pure text objects. Does anyone have any ideas Thank you for your help. Hey all. I solved my problem. Click link below to view my solution Click here to view solution ...Show All
tm9t9 implemnting cache in best possible way
I am working on how to implement caching in the best possible manner when we are implementing 1. optimistic concurrency (1 st scenario: we can live with stale data. 2 nd scenario :we cannot live with stale data) 2. pessimistic concurrency Here I also want to cover scenarios like when two thread of the same application accessing the same table in database by using different queries and when both have these query results in different cached objects.So what strategy should I use to make the cache stale ,at what moment of time. Please share your views on the above. Regards Hi Paul, Thanks for your elaborate reply. I am actually doing a study ...Show All
curiousss Hybrid between Cells.Select and ActiveCell.CurrentRegion?
Hello guys, Assume I have data like this. Each < > Means a cell. < > Means nothing in the cell. <A1><B1> < >< > < ><B3> If I use Cells.Select, the range will be ("A1: IV65536") too much selection. If I use ActiveCell.CurrentRegion, the range will be ("A1:B1") not enought selection. I wish to select the range ("A1:B3"). What should I do Thank you. Here's code that demonstrates how to do this. Option Explicit Public Sub DoSelect() Dim c1 As String, c2 As String With Sheet1 c1 = .Cells(1, 1) c2 = .Cells(2, 1) .Range(c1 & ":" & c2).Select End With End Sub It ...Show All
CalcProgrammer1 Order by in select statement not working
Hi there - i have a select statement that runs on form load that allows selection of appropriate company names from a combo box based on if the user is the owner of a company, which works great, syntax is below; Me.companyname.RowSource = "SELECT [companyname] FROM [qryactivity] WHERE [active] = Yes AND [leadofficer] ='" & loginname & "'" However i want to sort them alphabetically by name but cannot get it to work, i keep getting syntax errors, i have added the following code but it does not like it: Me.companyname.RowSource = "SELECT [companyname] FROM [qryactivity] ORDER BY [companyname]ASC WHERE [active] = Yes AND [leadofficer] ='" & loginname & "'" any help would be greatly appreciated. Rhys. ...Show All
Ricardo 8a adding text to cell with vba script
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&"May!D"&i&"June!D"&i&"July!D"&i&"August!D"&i&"September!D"&i&"October!D"&i&"November!D"&i&"December!D"&i Try this. Cells(i, 3).FormulaR1C1 = "Hello World" Cells(i, 3) returns a r ...Show All
rivers Copy text from textbox to clipboard?
How to copy just the text from a textbox to the clipboard in VBA (MSO 2000 - Excel). I can copy the entire textbox but I only want the text (not the box). My brain has gone to sleep and I can't do it :( can in VB but do not want to reference VB components. Cheers. NM I have the same emergency. Could you post the code snippet you used please. I can't find any reference to " PutInClipboard" Graham, reference to PutInClipboard is here: http://msdn.microsoft.com/archive/default.asp url=/archive/en-us/office97/html/output/F1/D6/S5B40E.asp . I haven't used this function so I can't vouch for it. I suspect it's deprecated by now and you're probably safer using the API. Check http ...Show All
dlcollison VBA within Excel_revised
Hello, I have graphs that are updated every quarter using VB in excel. These are column graphs with labels which are locations (only 8) like WA, OR, TX underneath each column. I would like to keep the locations and include a data table underneath the columns using vba in excel but I am new to vba. How would I do this using vba Thanks very much in advance.. Here is the code..the "has data table" does not work but the rest of the code does. 'chart configuation activesheet.chartobjects("chart 13").chart.chartTitle._ Chartacters.Text = "TX B use 6 months." ActiveSheet.ChartObjects("Chart 13").Chart.SetSourceData_ Source:=Sheets(CBHChartSourceData").R ...Show All
Lars E.Nes Dynamics decrease performance
Hello, I actually work on crm. The time to load/save the page is long (more than 16s) The page got 400 fields in 8 tab separator....(yes one page!!!!!) For my director, the trouble come with my javascript (102 fields got some javascript's code which had more than 100 lines in the same page...) I take the execution time of my javascript : Onload 0.6s OnSave 0.5s For me, the only way to optimise my javascript is making some function, I can call in my different OnChange or OnLoad but I don't know how to make it here's a way ++ PS: exemple of my OnSave code : I have disabled some field in my page, but I want to save those one so I make (0.5s) : For ( var n=0;n<crmForm.elements.length;n++ ) { if ( crmForm.elements[ n ].Disabled ) { crmForm ...Show All
Luke Breuer Setting back color in MSComctlLib.TreeCtrl.2 control using VB for MS Access
Hi there, I would like to set the background color of a treeview control to another default windows color other than the 'white window'. Say I want to use the constant vbActiveBorder . Now the ImageList control allows for the setting of these values via properties, but the Treeview control does not. How do I go about setting the back color of the treeview control For info I have already set up the icons etc with a magenta mask, so that they will be transparent etc. Thanks in advance You can't do that directly via VB. You have to use Win32 API. For more information regarding this issue, please look into the information regarding SendMessageA() function on the web. ...Show All
briggins5 automating new folder creation within excel
Hey all, New to this forum and also relatively new to VBA. I apologise if this is a bit long, but I want to make my problem as clear as I can. I’ve created a file tracking system for work with information on customers, projects and who’s working on them etc. What I wish to achieve is to create a macro that will create folders in our shared drive based on the input in a specific row. This will help reduce the time taken on admin. So for a new file entry (e.g. filename; customer; project;…) I would want to create folders for C:\customer\project\filename\ It would need an input box so that the user can input the row or file name that they wish to create the folder for. I will then map this mac ...Show All
vkan MODI and automated printing without manual intervention
Hi All, I would like to print a file to the MODI virtual printer without any manual intervention. My problem is the output file dialog that appears when I fire the print command from the associated application. However, Word documents could be printed to MODI without any manual intervention by using the PrintOut() method of the Word Application object and specifying the output filename parameter. If Word can pass the output filename to MODI in an automated fashion, my application should be able to as well! What could Word be doing to pass the output filename to the MODI Image Writer port Is there a registry key or some API for the MODI Image Writer port so that I could achieve the same using C# Thanks in advance!!! Viv ...Show All
Darren Tao How to adress a single cell in a named area
I have a named area "Stock" on a spreadsheet (Office XP), the range is defined as follows: =OFFSET('Stock List'!$K$1,0,0,COUNTA('Stock List'!$F:$F),4) ie it starts at K1, is 4 cols wide and as deep as the number of used cells in Col F I want to access this in an array format using VBA, ie using variables to define the position of a single cell within the array and to either read or set the value of that cell. I tried Range("Stock").Offset(x,y).value="test" to put 'test' into cell x,y in the array - it puts the value into a range, not just a cell. and to get the value i.e. variable=Range("Stock").Offset(x,y).value What is the correct code please ALlan ...Show All
Mel V random letters
Hi, I need help with a excel file. I have excel pro 2007 beta loaded. These are the questions. For a scoring system in horseshoes. There are 3 worksheets. On the 2 nd sheet when you click the green button on that sheet which runs the macro. It will randomly change cells D3-D11 column on the 3 rd sheet with 2sets letters A,A B,B C,C D,D E and matching cell colors on the 3 rd sheet column D3 through D11. So the matching letters and colors will correspond to be opponents in that round of play. Once any team is out after two losses. The cells in column D3 through d11 turn black letting you know you are Out of the game. I need on the next round to click the green button again. So team opponents can be picked accord ...Show All
