Hmm. Maybe I'll work on making the text box with the entry request have a selection of possible cell references. For the thing I'm working on now entering cell references should do, but there's a few similar but different cases where user selection by pointing and clicking would be very helpful!
Nevermind, I'll have to find a different workaround, thanks for the help!
User Profile
Collapse
-
Sadly not, as if they could do that it's not much better than the current manual copy/paste method used... If it's not possible, we'll have to stick with it as is!Leave a comment:
-
Erm, that code doesn't give me any errors, but the paste doesn't happen? I get the message box and there is a value shown but when I click 'OK' nothing more happens...
Thanks :)Leave a comment:
-
Using user input to select cells to paste into
For now I'm trying to just work out how user input works, but my goal is to have a macro which will pause and ask the user to select the cells to paste into and then paste the relevant data where the user has selected.
In a possibly clearer form:
- macro copies data
- macro asks for user to select cell
- macro pastes data into user selected cell
I have this (not working) code so far:
... -
Ok, so Luk3r's new code partially works, but ONLY the 'Allocations' sheet is showing up, not any of the 'Or' sheets...
The code from ADezii does the trick very nicely, however. Think I'll go with that as it's MUCH neater than my current code! Thanks!Leave a comment:
-
@NeoPa - actually Luk3r's code is now different, the original used AndAlso which after it didn't work I did some research and realised (as he clearly did!) that AndAlso isn't a function in VBA...
I have made a workaround, but it's not pretty - I basically just said:
'Hide everything' then 'unhide these specific sheets'.
I'll have a play now with these other ideas and see which works best for me - I'd much rather a...Leave a comment:
-
I'm getting a compile error with that? Saying it's expecting 'Then' or Goto'...Leave a comment:
-
If/Then with 'Or' not Returning Expected Results
I *think* this is the right section as it's a VBA issue, sorry if it's not!
So I'm tryign to get an excel file to open with all but certain worksheets hidden. I have found some code to make ONE sheet visible and all others hidden, and have tried to edit it to get the three I want to show by using 'or' in the If/Then statement, but it's still only showing one worksheet. Here.s the code I've got to:
...Code:Private Sub Workbook_Open()
-
Wildcard in searches beginning and ending terms
Ok, so I have got my search form working now (thanks to various people for helping with previous issues!), and I have wildcards for all but the date entries (not sure if it's possible for that?). However, the wildcards are only for the END of an entry, so for example 'ab*' will find 'abc123' (and 'abd234', etc) but I was wonderign if it's possible to do the same with the sart, so '*c123' would find 'abc123' and acc123' etc?
Cheers... -
Thanks, that's cured it! Knew it would be something simple and probably obvious if you have the experience!
Cheers :)Leave a comment:
-
-
*facepalm* I thought I'd changed that, must have forgotten to click save after or something >.<
And it's still having the same error I reported in my last post
CheersLast edited by neobrainless; Jul 3 '13, 01:27 PM. Reason: Forgot to add the results of trying with adjusted codeLeave a comment:
-
Ok, so I followed zmbd's instructions in the first reply and I got a DIFFERENT error >.<
Run-time error '3075':
Syntax error (missing operator)in query expression '[DateCreated] #21/08/1991#'
And it failed on line 32 of the first lot of code in my original post - where you predicted! Just odd (to me) that it's a different error today! :/
Thanks :)Leave a comment:
-
2455 error - invalid reference to property RecordSource
So trying to fix one error, I have discovered/created another. I was advised to start a new thread and attach the full code I'm 'working with' ('ineffectually clubbing at' might be a better term to describe where I'm at right now!).
My goal with this code is to allow me to search my simple database (two tables linked by an autonumbered ID column). I have adapted code from the internet, using help from here and my very rudimentary VBA... -
Hi, I had a quick read through, but my brain wasn't accepting the data (been a long day!)... Thanks for clarifying it!
I'll have a look at that link and sort out another thread for the new problem, thanks for your help! :)Leave a comment:
-
Ok, I'm a little confused now - My PC is in England, set to DD/MM/YYYY format. Which format do I need to force in VBA?! Tbh, I've tried both with no change in result, so I guess it's likely not that that's the problem?Leave a comment:
-
Hi,
I believe the 'AND' at the end of the line is surplus to requirements (possibly somethign to do with the wildcards in the other lines I just copied over?).
Anyway, the whole block is:
...Code:' Check for Date Created If Me.txtDateCreated > "" Then varWhere = varWhere & "[DateCreated] #" & Format(Me.txtDateCreated, "MM/DD/YYYY") & "# AND "Leave a comment:
-
Thanks for the hint, soundsl ike you could be right. However, having tried to change the code, I am now gettign an error:
Run time error '2455'
You entered an expression that has an invalid reference to the property RecordSource
I've got no idea what's changed - the line I changed now looks like:
...Code:varWhere = varWhere & "[DateCreated] #" & Format(Me.txtDateCreated, "DD/MM/YYYY")
Leave a comment:
-
Hi, print out is:
I'm using Access 2007.Code:SELECT * FROM FileInfQry WHERE [DateCreated] = #08/04/1991#
Cheers :)Leave a comment:
-
Hmm, I've checked and the original table is set to Date/Time for that field.
To clarify - I'm not using the quotes as part of the search terms, just typing in: 07/05/1991
CheersLeave a comment:
No activity results to display
Show More
Leave a comment: