Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. darvistor

    Random bracketed number in file name [3].csv

    Awesome PHV! This works perfectly. You have no idea how happy you have made my group now as they wont spend so much time re-exporting data. Thanks!
  2. darvistor

    Random bracketed number in file name [3].csv

    Hello all, I am having an issue with some vb code and importing data from a .csv file. I have a software program that we export a series of data out of every morning. When the first series of data is exported it is saved in the format of "query_export_results.csv". However, the next series of...
  3. darvistor

    Multi-Select Listbox output to use for Worksheet Autofilter

    Where do I run this from Skip? Can I just add this to a command button? Why SQL commands vs what I have originally? Just curious as I have not used these commands in a while. The problem I still have is that when I try to use my StartDate and EndDate commands for the following it doesnt work...
  4. darvistor

    Multi-Select Listbox output to use for Worksheet Autofilter

    Can someoen take a look at this code that was created using a macro and the query builder? It looks messy with the breaks, but this is how it was recorded. I just edited the text for confidentiality reasons. Sub Macro1() With ActiveSheet.ListObjects.Add(SourceType:=0...
  5. darvistor

    Multi-Select Listbox output to use for Worksheet Autofilter

    Ok, I just discovered a new issue with my form and data. The product list that I am using for the userform is a unique value list. It simply lists the 15 possible product choices. However, there are some records with more than one product selected such as Product1,Product2 or...
  6. darvistor

    Multi-Select Listbox output to use for Worksheet Autofilter

    Thanks Skip. I will look into your suggestions. Thansk PHV, this seems to resolve the issue. Not sure why I didn't think of that. That's what I get for copying the code from somewhere else. Darv.
  7. darvistor

    Multi-Select Listbox output to use for Worksheet Autofilter

    Hello all, I did some searches for this issue and there are some variations, but I can't seem to find my same issue. I am using Excel 2010 and have written/tweaked VBA code for a while now. I have a userform I created with 2 multi-select listboxes and 3 textboxes. The goal of my userform is to...
  8. darvistor

    Can't get Search/Replace to work within VBA

    I was just as confused when I activated the sheet prior to the replace command and it still didn't work. I am not using any with statements so I just expected it to look at all the cells and do the replace. The only way I got it to work was to select the range of data where I knew the...
  9. darvistor

    Can't get Search/Replace to work within VBA

    Yeah! I got it to work. The part about the narrow range got me thinking Pete. Because I selected the first cell where I wanted the data paste to start, that is the only cell that would have been affected, but this cell didnt have anything to replace. All I did was add the code to reselect the...
  10. darvistor

    Can't get Search/Replace to work within VBA

    Hmm, thanks Pete. I will check this out when I return to work on monday. Initially this code gets executed from the first worksheet of the current month's file. In the code I open the previous file, activate the Data Entry sheet, copy the data I want, switch to the current month's file...
  11. darvistor

    Can't get Search/Replace to work within VBA

    Yes, I made the replacewrd a variable that would be able to handle the search/replace month after month as the file names change. I stepped into the code and checked the value of replacewrd right before the code I pasted above. The string that is formed is what I expected. That is why I can't...
  12. darvistor

    Can't get Search/Replace to work within VBA

    Hello all, I have an excel file that gets populated every month and resaved based on the current month/year. I need to routinely copy a range of data from the previous month's file into the current month's file. Within the copy range there are some formulas that use vlookups into another...
  13. darvistor

    Setting the print area and header row issues

    [surprise] Which part are you agreeing with there?
  14. darvistor

    Setting the print area and header row issues

    Well my suggestion to the end user was to put each "chunk" (month) of data on its own worksheet. If one month had more rows of data then it could go to a second page without the other months printing on multiple pages. All they have to do is print the entire workbook to get the same data...
  15. darvistor

    Setting the print area and header row issues

    Yes, everything is very easy to do manually. Of course I can look at the data and put the page breaks where I want them. Yes, I can look where the data ends and set my print area. All of this can be done after the fact by the user. What I attempted to do was build the code to do it all...
  16. darvistor

    Setting the print area and header row issues

    Well thats a start at least. Hmmm, the issue I get now is that if one month doesnt have the same number of rows its 2nd or 3rd page doesnt have data. I end up with a page with the page header and the column names, which was problem number 2. I am using the intlastrow to set my print area as well.
  17. darvistor

    Setting the print area and header row issues

    Hello all, I tried searching through the forums and didn't see the exact issue I have so here goes. I have some data that on a monthly basis gets copied to another workbook and saved. I am trying to automate the process of doing the data copy, file saving and page formatting. So far I have...
  18. darvistor

    Excel VBA error- Copying data between workbooks

    I believe it was something like this(its at work so I am going by memory): Sheets("Mysheet").Select Range("A1:G404").Select Selection.Copy .....more code... I then tried this which didnt work: Sheets("Mysheet").Select Range("A1:G404").Copy .....more code... What I have now that works is...
  19. darvistor

    Excel VBA error- Copying data between workbooks

    Thanks Skip. You've given me help in the past and I appreciate advice from anyone who knows what they are talking about. In this particular case, the file opens to the same sheet every time and there is a procedure the users follow. In the code, I actually switch to the sheet I want the...
  20. darvistor

    Excel VBA error- Copying data between workbooks

    I went back and looked at the code and found that adding Activesheet in front of the range resolved the issue. I thought selecting the sheet in the previous line was sufficient but apparently not. Skip, please excuse my VBA ignorance, why should I avoid using Select/Activate? I can see cutting...

Part and Inventory Search

Back
Top