Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA - Not Excel
I've had a search on the internet, and can't find anywhere to ask this, so
thought I'd give it a shot here. I'm using WRQ Reflection for HP, V12 This uses VBA in a similar manner to Excel, and I've set up a macro to transfer across certain files. Unfortunatly, some of these files are based on today's date, ZZ060524 for example will be ZZ060525 tomorrow. I have no idea how to set up a variable... in Excel it was easy enough to work it all out in a cell or two, and tell the macro to look at that cell, but since Reflection has no cells to work stuff out (as far as I know) i'm stumped. Can anyone help, or at the very least point me somewhere were I might get help. Cheers |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA - Not Excel
Do you mean something like
sFile = "ZZ" & Format(Date,"yymmdd") -- HTH Bob Phillips (remove xxx from email address if mailing direct) "PaulW" wrote in message ... I've had a search on the internet, and can't find anywhere to ask this, so thought I'd give it a shot here. I'm using WRQ Reflection for HP, V12 This uses VBA in a similar manner to Excel, and I've set up a macro to transfer across certain files. Unfortunatly, some of these files are based on today's date, ZZ060524 for example will be ZZ060525 tomorrow. I have no idea how to set up a variable... in Excel it was easy enough to work it all out in a cell or two, and tell the macro to look at that cell, but since Reflection has no cells to work stuff out (as far as I know) i'm stumped. Can anyone help, or at the very least point me somewhere were I might get help. Cheers |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA - Not Excel
From that I changed
..WRQReceiveFile "", "ZZ060523", rcASCII, rcAskUser to ..WRQReceiveFile "", "ZZ" & Format(Date, "yymmdd"), rcASCII, rcAskUser And this worked perfectly! Cheers. Unfortunatly, it goes wrong on ..WRQReceiveFile "", "YYC" & Format(Date, "ymmdd"), rcASCII, rcAskUser From which I guess it doesn't like the Y only being 1 digit, and thats only a guess. My other problem seems to be that the macro I recorded seems to not have made a note where these files are to be transfered to, so they're going to the default folder, rather than where I want them. Will have to check the settings for that :p "Bob Phillips" wrote: Do you mean something like sFile = "ZZ" & Format(Date,"yymmdd") |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA - Not Excel
I would agree with your conclusion, so maybe try
sDate = Format(Date, "ymmdd") sDate = Right(sDate,Len(sDate-1)) ..WRQReceiveFile "", "YYC" & sDate, rcASCII, rcAskUser -- HTH Bob Phillips (remove xxx from email address if mailing direct) "PaulW" wrote in message ... From that I changed .WRQReceiveFile "", "ZZ060523", rcASCII, rcAskUser to .WRQReceiveFile "", "ZZ" & Format(Date, "yymmdd"), rcASCII, rcAskUser And this worked perfectly! Cheers. Unfortunatly, it goes wrong on .WRQReceiveFile "", "YYC" & Format(Date, "ymmdd"), rcASCII, rcAskUser From which I guess it doesn't like the Y only being 1 digit, and thats only a guess. My other problem seems to be that the macro I recorded seems to not have made a note where these files are to be transfered to, so they're going to the default folder, rather than where I want them. Will have to check the settings for that :p "Bob Phillips" wrote: Do you mean something like sFile = "ZZ" & Format(Date,"yymmdd") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop excel from dropping the 0 in the beginning of a number? | Setting up and Configuration of Excel | |||
Open Excel 2003 from Windows Explorer | Excel Discussion (Misc queries) | |||
Need suggestions for some uses of Ms Excel | Excel Discussion (Misc queries) | |||
Excel Range Value issue (Excel 97 Vs Excel 2003) | Excel Discussion (Misc queries) | |||
Excel 2002 and 2000 co-install. Control Which Starts ? | Excel Discussion (Misc queries) |