Computing.Net > Forums > Programming > Excel97-VBA problem

Excel97-VBA problem

Reply to Message Icon

Original Message
Name: koro41
Date: June 29, 2007 at 03:53:20 Pacific
Subject: Excel97-VBA problem
OS: win98se
CPU/Ram: pIII 800Mhz 128MB
Model/Manufacturer: Compaq Deskpro
Comment:

I have a macro which modifies the user's input which will be in the form of =4*3.6 or =(4*3.6)+(6*4.8)or similar. The macro then converts that to a string 4 @ 3.6 three cells to the left on the row below. Before the macro can continue the active cell must be in column F. I can use a Msg box with OKCancel to inform but if the user is off by one column the advanced filter output doesn't work


Report Offensive Message For Removal


Response Number 1
Name: Razor2.3
Date: June 29, 2007 at 15:27:26 Pacific
Reply: (edit)

Okay, and the problem is...?


Report Offensive Follow Up For Removal

Response Number 2
Name: pingy
Date: July 2, 2007 at 11:12:47 Pacific
Reply: (edit)

Ok, I understand Razor's comment :-)

Koro, if you're able to make a macro then you're halfway. Select the menu [Extra][Macro][Macros]. Edit your macro and put some code in it like:

Dim iCol as integer

iCol=ActiveCell.Column
if iCol<>5 then 'this is the 6th column
exit sub
end if

I'm not sure at this moment if columns are counted from zero otherwise check the value at runtime when hovering your mouse over the 'iCol' variable.

You could use something similar for row checking.

Good luck


Report Offensive Follow Up For Removal

Response Number 3
Name: koro41
Date: July 2, 2007 at 16:37:09 Pacific
Reply: (edit)

Many thanks i've been searching for days, many sources for finding particular cells, ranges, and rows. Thanks again


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Excel97-VBA problem

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes Today.
Discuss in The Lounge