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 Mike Lewis 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. AnnaWnz

    Problems Inserting Page Breaks in Excel when Printing

    Hi Have just discovered that this works okay in Excel 2000 but not in 97 - and most of our stuff is in 97. Is some part of the code only applicable to 2000, and if so, is there a way around it in 97? Thanks in advance. Anna
  2. AnnaWnz

    Problems Inserting Page Breaks in Excel when Printing

    Hi I am trying to get page breaks to insert when printing or print previewing. There are five buttons in the spreadsheet, each attached to a vba script that sets the relevant pages breaks, sets the print area, etc. All works ok, except the page breaks - any ideas?? Here is the code for one...
  3. AnnaWnz

    Help with User Roles

    Hi I am running a script that includes ALTER DATABASE, which requires a user with one of the following roles: - sysadmin - dbcreator - db_owner We don't want to use sa to run the script, but use someone's usual login. Is there any issue with having more than one db_owner for a database. Or...
  4. AnnaWnz

    Use a select statement to get parameters for stored procedure

    Hi Transcend When I run that line I get what I expected, which is why I'm confused that the code you gave me doesn't work. Hang on, think I've got it working now - something to do with the data not the script, shall have to do some more testing but shall post result! Thanks for your help. Anna
  5. AnnaWnz

    Use a select statement to get parameters for stored procedure

    Hi Transcend I have tried that - I don't get any errors, but I still get no results. It's still like the values being passed are not being picked up by the stored procedure correctly?? Any ideas? Anna
  6. AnnaWnz

    Use a select statement to get parameters for stored procedure

    Hi I am trying to run a stored procedure that requires four value be fed into it, but I don't want to use fixed values, but use values from a table instead and am not sure how to write this out. what I have written is: select value1, value2, value3, value4 from #TEMP1 EXEC stored_procedure...
  7. AnnaWnz

    Run SQL script conditional on logins & disable logins while script run

    Hi I am after a couple of bits of help: 1. I want to run a script, which is initiated manually, but it needs to check the Activity table firs to ensure that there are no users logged in, and if there are, then the script won't run and the user will be informed. I know how to find out if there...
  8. AnnaWnz

    SQL books

    Hi Does anyone have any recommendations for books on writing SQL queries? Cheers Anna
  9. AnnaWnz

    Update each row in a query with information from a different table

    Hi all I am trying to update a field in one table with information from another table based on a few restrictions. Table 1: holds the fields ITEMNUMBER and VENDORID Table 2: holds the fields VENDORID and VENDORCLASS Table 3: holds the fields ITEMNUMBER and CATEGORY The restrictions include...
  10. AnnaWnz

    ActiveX Control buttons disappear after Print Preview

    Hi The buttons all print okay (the PrintObject is true) and print preview okay, it is when I close the print preview that the buttons actually disappear off the worksheet - as if they were never there. ANd when you close the workbook, they don't return. As I say - as if they were never there...
  11. AnnaWnz

    ActiveX Control buttons disappear after Print Preview

    Hi all This one has me stumped!! I have an excel spreadsheet with extensive code running all sorts of functions etc - this is all working fine! I have a button on the front page that allows the user to print preview all the sheets (13 sheets). If you scroll through the various pages in the...
  12. AnnaWnz

    Pass a variable from a procedure to a User Form

    Hi Just wondering how you go about passing a variable that has a value set within a procedure in the objects part of the project, to a userform. I can pass variables from the userform to the procedure okay, but not the other way around. I have tried declaring the variabe as Public (had to do...
  13. AnnaWnz

    Input data into Excel from a csv file

    Cheers. Approach 1 is much quicker for my files (due to their size). Thanks Anna
  14. AnnaWnz

    Input data into Excel from a csv file

    Hi Is there an easy way to open a .csv file, and write the information into Excel, without doing the File Import? I want to open a file that has an undetermined number of rows (changes each month), with 7 columns, and write each row into an exisiting Excel worksheet, column by column. Cheers...
  15. AnnaWnz

    Reference data from another worksheet, conditional on two variables

    Finally got it to work. There was an issue with the way I was referencing the other worksheet, in defining my range Data. Your first post works perfectly! Thanks Anna
  16. AnnaWnz

    Reference data from another worksheet, conditional on two variables

    I get the error in the cell in which the formula is. Ie using the above example, the formula is entered into Cell L2 on the worksheet - that is where the #VALUE! shows. I wondered if I wasn't using correct variable declarations - the information is the table is imported in from a CSV file with...
  17. AnnaWnz

    Reference data from another worksheet, conditional on two variables

    HI Rob Have tried that and still get the #VALUE! error. Is there an easy way to feed the information from the worksheet into variables like you do with a sequential file? Cheers Anna
  18. AnnaWnz

    Reference data from another worksheet, conditional on two variables

    Hi Rob Have tried to work in your advice and have got this: Function FGetQty(ItemCode As String, Month As Range, DataType As String) As Double Application.Volatile ' Variables passed in with function: ' ItemCode - cell containing the Item Code for which the informtion relates...
  19. AnnaWnz

    Reference data from another worksheet, conditional on two variables

    Hi all I am trying to get a function to return a value for a cell based on two variables... In basic language, the cell that needs the value is in column "L". In the following example I refer to Row 2. Find the value of cell A2 in the data range (which is in another worksheet), and...

Part and Inventory Search

Back
Top