Search results

  1. V

    Excel Webservice Refresh

    Hi, I have what (I think) should be a relatively simple problem to solve, but I'm sure there must be a better way than my current solution! I am using the Webservice function to obtain stock price data from Yahoo Finance, that all works correctly, however I can not work out any way to refresh...
  2. V

    2nd MySQL Dataset not working

    I have a function: //---------------------------------------------------------------------- $server_name='xxx'; $user_name='xxx'; $password='xxx'; $database_name='xxx'; $db1= new mysqli($server_name, $user_name, $password, $database_name)...
  3. V

    File Size increasing on button click

    I have some code that fires on a button press, which deletes any existing buttons, then adds a series of new buttons. I'm not 100% sure this is what is causing the file size to increase dramatically every time the initial button is clicked, but it seems likely. The odd thing is, I've checked...
  4. V

    Excel VBA- Multiple Command Buttons- Single Macro

    I have some code that loops through a series of rows, the data comes from a MySQL database and when a query button is clicked the code fires and a command button is created on each row. The name of the command button is assigned by an ID field, which is a column from the database. So far so...
  5. V

    Dynamic Range

    I am trying to use the following: ThisWorkbook.Worksheets(fromworksheet).Range(Cells(1, 1), _ Cells(filterrows, filtercolumns)).AdvancedFilter _ Action:=xlFilterInPlace, CriteriaRange:=Sheets(toworksheet).Range("E1:E2"), Unique:=False However it does not work. If however I type in the range as...
  6. V

    Dynamic Reference to a control

    Hi, I am trying to write a function with the control name as a variable, but I can't seem to do this and can't find any code examples anywhere. I'm sure I've done this before, so pretty confident it is possible, does anyone have any ideas? My code is as follows: Function...
  7. V

    Deleting Duplicate Rows

    Can anyone see why this doesn't work? I have a function (below), which loops through each row and then deletes if it finds a dupe, however for some reason it doesn't seem to work.... I have modified the code slightly, so that rather than deleting the row it simply inserts the word 'delete' in...
  8. V

    Find Method In VBA

    The following code works fine for me fine when searching for a text string within the current worksheet: Cells.Find(What:="TEXT STRING HERE", LookIn:=xlValues, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ , SearchFormat:=False).activate...
  9. V

    Excel VBA Copy Problem (Keystrokes?)

    Hi, I have written some VBA code which calls up a Bloomberg screen and inputs the relevant data based on that entered into an Excel spreadsheet, this all works fine, however I now need to pull the results back from Bloomberg and paste the data into Excel. According to Bloomberg there is no...
  10. V

    Set Rowsource Propety- Excel

    Hi, I am trying to set the rowsource property of a combobox by vba code. That in itself is simple enough, however I want the range covered to be all of column a (apart from row 1) and all of column b (apart from row 1) and I can't seem to work out the syntax. Is there a way to do this? Thanks...
  11. V

    Sending E-Mail

    I have a button set up to send an email when clicked. I intended to send an email to everyone in a table, however I keep getting the following message: Runtime error '2295' Unknown message recipient(s); the message was not sent This is because the names are in the format SURNAME, FORENAME as...
  12. V

    Public Sub

    I have the following code which works fine: Private Sub refselect_AfterUpdate() Refselect1 = fnrefselect() Select_Action2 = FnSelect_Action() End Sub However is there a way of creating a public sub in a module assuming that there is a refselect control in every form and I can dynamically...
  13. V

    Current Form Name

    Does anyone know how I can refer to the current form by using some sort of dynamic code. I want to refer to a control (which will have a fixed name), something along the lines of: forms![FORMNAME]![Refselect] I've tried creating a variable and I can return the current formname to that but I...
  14. V

    Excel Module from within Access?

    What I want to be able to do is click a button in Access, for this to export some data into an Excel file and then format the data programmatically in Excel. I have created command buttons in Access and Excel which contain the necessary code for each part, however ideally I want the user to be...
  15. V

    Ranking

    Does anyone know how to rank scores in a form by using VBA coding? I have seen examples of ranking tables using queries, but when I tried this it didn't seem to work as the data seemed to become read only all of a sudden and I couldn't work out why. I've seen a couple of VBA examples on this...
  16. V

    Combo Box

    Hi, I have a combo box in a form, which displays names of people based on their ID number, from a field called number. On my form I have the number field displayed in a seperate control to the drop down menu. Although this works fine, whenever I click on any field other than the combo box and...
  17. V

    Running Sum

    I am trying to create a running sum so that I can total up a field after every entry. The table is in the format below: Column 1- ID Column 2- Date Column 3- Score The ID is unique for each record, however the date is not. I have created a running sum which works, except I want the totals...
  18. V

    Refresh

    Hi, I ma trying do something which I thought was quite simple, but I can't seem to do it. All I want to do is for the form to refresh every time a key is pressed. Can anyone help? Thanks, Vidal
  19. V

    Rolling Average

    Hi, I am trying to create a rolling average in a form footer, i.e. I want to calculate the average of the last two entries in a field from the last two records (sorted by date, or record number). Thanks, Vidal
Top Bottom