Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 265
Default 2 questions, 1 easy about "" in VB, 1 very difficult

1.
I want to do the following:
sub fdljsdf()
bla bla bla

a = Target.Address
b = Right(Left(a, 2), 1)
u = Range(a).Row
If b = "I" Then
Range("J" & u).Formula = "=I" & u &
"/Vlookup(E6,[Registros.xls]Inventario!A:CA,[Registros.xls]Inventario!$C$3,0)"
End If
more bla bla bla
end sub

the question is:
If I want to change the formula so if there is no value in I & U output ""
the formula should look this way:

Range("J" & u).Formula = "=if(I" & u & "<"",I" & u &
"/Vlookup(E6,[Registros.xls]Inventario!A:CA,[Registros.xls]Inventario!$C$3,0),"")"

This difficult formula means, if for example, the user tryng to change cell
I6 then:
If cell I6<"" then cell I6/(a value in registros that should be founded)
else print "".

the problem is that VB misunderstanding the "" before the < and the ""
after the ,
how to explain VB that those "" are from the formula and aren't indicating
that they're text separators in the formula

please help me, this is driving me crazy.......


NOW THE OTHER ONE

2.
Hi, I'm tryng to accomplish something difficult to explain:
If you open a workbook (ex. hello.xls) and the you go to file--open another
file (ex. hello2.xls) then you have hello.xls and hello2.xls in the same
excel window, but if you open hello.xls ant then you go to the excels general
icon (the one that opens an excel window with a new woorkbook on it) ant
then you choose file--open hello2.xls then you have 2 excel windows, now my
problem: I have my firs book hello.xls with all the menu bars disabled but
the woorkbook hello2.xls needs all the menu bars enabled so if I open my
workbook as explained on the second way to open the file I can have my file
hello.xls without the menu bars and hello2.xls with all the menu bars
enabled; BUT I NEED TO OPEN EXCELS GENERAL ICON TO ACHIVE THIS, I mean, I
cant paste a shortcut in the desktop because when I open the second file, it
opens in the excels window of my first file.
It's very important that the user of my program could open the file from the
desktop, so there is a way to do what I want?????
If you want to see an example of what I mean firts open a excel file (any)
and then go to Iexplorer browser and choose the export data to excel
(pressindg the right button of your mouse and choosing the option mentioned),
as you can see not just a new workbook has been opened but a entire excel new
window (with his own workbook)
Hope this have sence, TIA

ALSO AS ENGLISH IS NOT MY FIRST LENGUAGE COULD YOU TELL ME HOW THE "" ARE
NAMED PLEASE
TIA


  #2   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default 2 questions, 1 easy about "" in VB, 1 very difficult

to answer your second question:

In Hello.xls use the workbook_activate and workbook_deactivate eventsto
toggle the menu usage. You probably already have something in place to hide
and unhide the menus in the _open and _beforeclose events. All you need to
do is reference that. I've done something similar where I have a macro in a
regular module called HideMenus and another called ShowMenus. I call
HideMenus in the _activate and _open events, and I call ShowMenus in the
_deactivate and _beforeclose events.


"filo666" wrote:

1.
I want to do the following:
sub fdljsdf()
bla bla bla

a = Target.Address
b = Right(Left(a, 2), 1)
u = Range(a).Row
If b = "I" Then
Range("J" & u).Formula = "=I" & u &
"/Vlookup(E6,[Registros.xls]Inventario!A:CA,[Registros.xls]Inventario!$C$3,0)"
End If
more bla bla bla
end sub

the question is:
If I want to change the formula so if there is no value in I & U output ""
the formula should look this way:

Range("J" & u).Formula = "=if(I" & u & "<"",I" & u &
"/Vlookup(E6,[Registros.xls]Inventario!A:CA,[Registros.xls]Inventario!$C$3,0),"")"

This difficult formula means, if for example, the user tryng to change cell
I6 then:
If cell I6<"" then cell I6/(a value in registros that should be founded)
else print "".

the problem is that VB misunderstanding the "" before the < and the ""
after the ,
how to explain VB that those "" are from the formula and aren't indicating
that they're text separators in the formula

please help me, this is driving me crazy.......


NOW THE OTHER ONE

2.
Hi, I'm tryng to accomplish something difficult to explain:
If you open a workbook (ex. hello.xls) and the you go to file--open another
file (ex. hello2.xls) then you have hello.xls and hello2.xls in the same
excel window, but if you open hello.xls ant then you go to the excels general
icon (the one that opens an excel window with a new woorkbook on it) ant
then you choose file--open hello2.xls then you have 2 excel windows, now my
problem: I have my firs book hello.xls with all the menu bars disabled but
the woorkbook hello2.xls needs all the menu bars enabled so if I open my
workbook as explained on the second way to open the file I can have my file
hello.xls without the menu bars and hello2.xls with all the menu bars
enabled; BUT I NEED TO OPEN EXCELS GENERAL ICON TO ACHIVE THIS, I mean, I
cant paste a shortcut in the desktop because when I open the second file, it
opens in the excels window of my first file.
It's very important that the user of my program could open the file from the
desktop, so there is a way to do what I want?????
If you want to see an example of what I mean firts open a excel file (any)
and then go to Iexplorer browser and choose the export data to excel
(pressindg the right button of your mouse and choosing the option mentioned),
as you can see not just a new workbook has been opened but a entire excel new
window (with his own workbook)
Hope this have sence, TIA

ALSO AS ENGLISH IS NOT MY FIRST LENGUAGE COULD YOU TELL ME HOW THE "" ARE
NAMED PLEASE
TIA


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 2 questions, 1 easy about "" in VB, 1 very difficult

Try this

Range("J" & u).Formula = "=if(I" & u & "<"""",I" & u &
"/Vlookup(E6,[Registros.xls]Inventario!A:CA,[Registros.xls]Inventario!$C$3,0
),"""")"


--

HTH

RP
(remove nothere from the email address if mailing direct)


"filo666" wrote in message
...
1.
I want to do the following:
sub fdljsdf()
bla bla bla

a = Target.Address
b = Right(Left(a, 2), 1)
u = Range(a).Row
If b = "I" Then
Range("J" & u).Formula = "=I" & u &

"/Vlookup(E6,[Registros.xls]Inventario!A:CA,[Registros.xls]Inventario!$C$3,0
)"
End If
more bla bla bla
end sub

the question is:
If I want to change the formula so if there is no value in I & U output ""
the formula should look this way:

Range("J" & u).Formula = "=if(I" & u & "<"",I" & u &

"/Vlookup(E6,[Registros.xls]Inventario!A:CA,[Registros.xls]Inventario!$C$3,0
),"")"

This difficult formula means, if for example, the user tryng to change

cell
I6 then:
If cell I6<"" then cell I6/(a value in registros that should be founded)
else print "".

the problem is that VB misunderstanding the "" before the < and the ""
after the ,
how to explain VB that those "" are from the formula and aren't indicating
that they're text separators in the formula

please help me, this is driving me crazy.......


NOW THE OTHER ONE

2.
Hi, I'm tryng to accomplish something difficult to explain:
If you open a workbook (ex. hello.xls) and the you go to file--open

another
file (ex. hello2.xls) then you have hello.xls and hello2.xls in the same
excel window, but if you open hello.xls ant then you go to the excels

general
icon (the one that opens an excel window with a new woorkbook on it) ant
then you choose file--open hello2.xls then you have 2 excel windows, now

my
problem: I have my firs book hello.xls with all the menu bars disabled but
the woorkbook hello2.xls needs all the menu bars enabled so if I open my
workbook as explained on the second way to open the file I can have my

file
hello.xls without the menu bars and hello2.xls with all the menu bars
enabled; BUT I NEED TO OPEN EXCELS GENERAL ICON TO ACHIVE THIS, I mean, I
cant paste a shortcut in the desktop because when I open the second file,

it
opens in the excels window of my first file.
It's very important that the user of my program could open the file from

the
desktop, so there is a way to do what I want?????
If you want to see an example of what I mean firts open a excel file (any)
and then go to Iexplorer browser and choose the export data to excel
(pressindg the right button of your mouse and choosing the option

mentioned),
as you can see not just a new workbook has been opened but a entire excel

new
window (with his own workbook)
Hope this have sence, TIA

ALSO AS ENGLISH IS NOT MY FIRST LENGUAGE COULD YOU TELL ME HOW THE "" ARE
NAMED PLEASE
TIA




  #4   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default 2 questions, 1 easy about "" in VB, 1 very difficult

You know, you've already had this question answered a number of times. If
this doesn't work, please ask for more of an explanation, but don't cut and
paste the same question over and over (at least 7 times according to my
count). Tell us what part of the answer is giving you problems and we'll
work that part.



"JNW" wrote:

to answer your second question:

In Hello.xls use the workbook_activate and workbook_deactivate eventsto
toggle the menu usage. You probably already have something in place to hide
and unhide the menus in the _open and _beforeclose events. All you need to
do is reference that. I've done something similar where I have a macro in a
regular module called HideMenus and another called ShowMenus. I call
HideMenus in the _activate and _open events, and I call ShowMenus in the
_deactivate and _beforeclose events.


"filo666" wrote:

1.
I want to do the following:
sub fdljsdf()
bla bla bla

a = Target.Address
b = Right(Left(a, 2), 1)
u = Range(a).Row
If b = "I" Then
Range("J" & u).Formula = "=I" & u &
"/Vlookup(E6,[Registros.xls]Inventario!A:CA,[Registros.xls]Inventario!$C$3,0)"
End If
more bla bla bla
end sub

the question is:
If I want to change the formula so if there is no value in I & U output ""
the formula should look this way:

Range("J" & u).Formula = "=if(I" & u & "<"",I" & u &
"/Vlookup(E6,[Registros.xls]Inventario!A:CA,[Registros.xls]Inventario!$C$3,0),"")"

This difficult formula means, if for example, the user tryng to change cell
I6 then:
If cell I6<"" then cell I6/(a value in registros that should be founded)
else print "".

the problem is that VB misunderstanding the "" before the < and the ""
after the ,
how to explain VB that those "" are from the formula and aren't indicating
that they're text separators in the formula

please help me, this is driving me crazy.......


NOW THE OTHER ONE

2.
Hi, I'm tryng to accomplish something difficult to explain:
If you open a workbook (ex. hello.xls) and the you go to file--open another
file (ex. hello2.xls) then you have hello.xls and hello2.xls in the same
excel window, but if you open hello.xls ant then you go to the excels general
icon (the one that opens an excel window with a new woorkbook on it) ant
then you choose file--open hello2.xls then you have 2 excel windows, now my
problem: I have my firs book hello.xls with all the menu bars disabled but
the woorkbook hello2.xls needs all the menu bars enabled so if I open my
workbook as explained on the second way to open the file I can have my file
hello.xls without the menu bars and hello2.xls with all the menu bars
enabled; BUT I NEED TO OPEN EXCELS GENERAL ICON TO ACHIVE THIS, I mean, I
cant paste a shortcut in the desktop because when I open the second file, it
opens in the excels window of my first file.
It's very important that the user of my program could open the file from the
desktop, so there is a way to do what I want?????
If you want to see an example of what I mean firts open a excel file (any)
and then go to Iexplorer browser and choose the export data to excel
(pressindg the right button of your mouse and choosing the option mentioned),
as you can see not just a new workbook has been opened but a entire excel new
window (with his own workbook)
Hope this have sence, TIA

ALSO AS ENGLISH IS NOT MY FIRST LENGUAGE COULD YOU TELL ME HOW THE "" ARE
NAMED PLEASE
TIA


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default 2 questions, 1 easy about "" in VB, 1 very difficult

Hi,

For 1, try:

Range("J" & u).Formula = "=IF(I" & u & "<"""",I" & u &
"/Vlookup(E6,[Registros.xls]Inventario!A:CA,[Registros.xls]Inventario!$C$3,0),"""")"

"filo666" wrote:

1.
I want to do the following:
sub fdljsdf()
bla bla bla

a = Target.Address
b = Right(Left(a, 2), 1)
u = Range(a).Row
If b = "I" Then
Range("J" & u).Formula = "=I" & u &
"/Vlookup(E6,[Registros.xls]Inventario!A:CA,[Registros.xls]Inventario!$C$3,0)"
End If
more bla bla bla
end sub

the question is:
If I want to change the formula so if there is no value in I & U output ""
the formula should look this way:

Range("J" & u).Formula = "=if(I" & u & "<"",I" & u &
"/Vlookup(E6,[Registros.xls]Inventario!A:CA,[Registros.xls]Inventario!$C$3,0),"")"

This difficult formula means, if for example, the user tryng to change cell
I6 then:
If cell I6<"" then cell I6/(a value in registros that should be founded)
else print "".

the problem is that VB misunderstanding the "" before the < and the ""
after the ,
how to explain VB that those "" are from the formula and aren't indicating
that they're text separators in the formula

please help me, this is driving me crazy.......


NOW THE OTHER ONE

2.
Hi, I'm tryng to accomplish something difficult to explain:
If you open a workbook (ex. hello.xls) and the you go to file--open another
file (ex. hello2.xls) then you have hello.xls and hello2.xls in the same
excel window, but if you open hello.xls ant then you go to the excels general
icon (the one that opens an excel window with a new woorkbook on it) ant
then you choose file--open hello2.xls then you have 2 excel windows, now my
problem: I have my firs book hello.xls with all the menu bars disabled but
the woorkbook hello2.xls needs all the menu bars enabled so if I open my
workbook as explained on the second way to open the file I can have my file
hello.xls without the menu bars and hello2.xls with all the menu bars
enabled; BUT I NEED TO OPEN EXCELS GENERAL ICON TO ACHIVE THIS, I mean, I
cant paste a shortcut in the desktop because when I open the second file, it
opens in the excels window of my first file.
It's very important that the user of my program could open the file from the
desktop, so there is a way to do what I want?????
If you want to see an example of what I mean firts open a excel file (any)
and then go to Iexplorer browser and choose the export data to excel
(pressindg the right button of your mouse and choosing the option mentioned),
as you can see not just a new workbook has been opened but a entire excel new
window (with his own workbook)
Hope this have sence, TIA

ALSO AS ENGLISH IS NOT MY FIRST LENGUAGE COULD YOU TELL ME HOW THE "" ARE
NAMED PLEASE
TIA


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
UGhhhhh! Why is this so difficult - NO COPY "" Teddy-B Excel Discussion (Misc queries) 1 May 11th 09 08:41 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
How do I find ""Easy Sum" Not Auto Sum Damar Excel Discussion (Misc queries) 1 January 15th 07 12:19 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 01:00 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"