#1   Report Post  
Posted to microsoft.public.excel.misc
PaulW
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
PaulW
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop excel from dropping the 0 in the beginning of a number? Rosewood Setting up and Configuration of Excel 12 April 4th 23 02:12 PM
Open Excel 2003 from Windows Explorer pmpjr Excel Discussion (Misc queries) 9 September 11th 06 03:58 PM
Need suggestions for some uses of Ms Excel Bible John Excel Discussion (Misc queries) 1 February 27th 06 05:30 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Excel 2002 and 2000 co-install. Control Which Starts ? cnuk Excel Discussion (Misc queries) 2 January 17th 05 08:07 PM


All times are GMT +1. The time now is 04:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"